Professional Web Applications Themes

Count the number of lines in a file without actually iterating through the file - PERL Beginners

Removed by Administrator...

  1. Moderated Post

    Default Count the number of lines in a file without actually iterating through the file

    Removed by Administrator
    Jason Guest
    Moderated Post

  2. #2

    Default RE: Count the number of lines in a file without actually iterating through the file

    > -----Original Message----- 

    No. Part of the problem is that different operating systems
    have different ideas of what constitutes a line, hence you
    have to read every byte to make sure::

    Unix : the '0x0a' or linefeed ends a line'
    DOS : the '0x0d 0x0a' or carriage-return linefeed sequence ends a line.
    hence an '0x0a' on its own should not count.
    CYBER: zero padded 60bit word constitues an end of line. you cannot
    search the data for 'end of line' characters, because an end of
    line is the ABSENCE of character data which you can only
    identify
    by scanning the file.

     

    Lets look at this a moment:

    perl -lpe '}{*_=*.}{' file works this way:

    perl -e expect the rest of the command to be a script to run, hence
    '}{*_=*.}{' is the script.

    perl -l chomps input, and assigns 'output record separator = input
    record separator'
    or in english, 'print' will always print a newline at the end of a
    line.

    perl -p wraps
    while(<>) {
    your code
    } continue {
    print || die "............"
    }

    Now, if we insert your code, we get:

    while(<>) {
    } { *_=*. } {
    } continue {
    print
    }

    which is actually

    while( <> ) {}

    {
    *_=*.
    } continue {
    print
    }

    Which is actually an obfuscated way to say:

    while(<>) { } # scan file, do nothing with the input
    print $.

    Hence, this script ITERATES over the entire file/input stream, and
    at the end, prints the CURRENT INPUT RECORD NUMBER. Naturally the
    "CURRENT INPUT RECORD NUMBER" at the end of file happens to equal
    the number of lines in the file!

    voila.

    Please don't use obfuscated code written by insane people until you
    know enough about perl to realised whatever is going on is not
    necessarily safe or portable.


    David

    David Guest

  3. #3

    Default Re: Count the number of lines in a file without actually iterating through the file

    Jason Normandin wrote: 

    Hello,
     

    Ooh, an obfuscated verbose way of writing:

    perl -lpe'}{$_=$.' file

     

    open FILE, 'somefile' or die "Cannot open somefile: $!";
    1 while <FILE>;
    print "$.\n";


    John
    --
    use Perl;
    program
    fulfillment
    John Guest

  4. #4

    Default Re: Count the number of lines in a file without actually iterating through the file


     
    >
    > Ooh, an obfuscated verbose way of writing:
    >
    > perl -lpe'}{$_=$.' file[/ref]


    Huh? Could someone explain this? The "}{" makes no sense to me...

    - B

    Bryan Guest

  5. #5

    Default Re: Count the number of lines in a file without actually iterating through the file

    On Feb 27, 2004, at 1:13 PM, Bryan Harris wrote:
     
    >>
    >> Ooh, an obfuscated verbose way of writing:
    >>
    >> perl -lpe'}{$_=$.' file[/ref]
    >
    >
    > Huh? Could someone explain this? The "}{" makes no sense to me...[/ref]

    I thought the same thing, when I read it! I'm still not sure I get it,
    but perlrun say the -p switch expands to:

    LINE:
    while (<>) {
    ... # your program goes here
    } continue {
    print or die "-p destination: $!\n";
    }

    If your string is literally dropped in there, it might end the while
    loop and then start another block.

    Just a guess.

    James

    James Guest

  6. #6

    Default Re: Count the number of lines in a file without actually iterating through the file

    Bryan Harris wrote:
     
    > >
    > > Ooh, an obfuscated verbose way of writing:
    > >
    > > perl -lpe'}{$_=$.' file[/ref]
    >
    > Huh? Could someone explain this? The "}{" makes no sense to me...[/ref]

    Well, as Momma used to say:
    "Just look the other way. Ignore it, and maybe it will go away..."

    I would not be at all surprised if the code above works, and does *something*.
    I just prefer to use code that says what it is doing.

    Joseph

    R. Guest

  7. #7

    Default Re: Count the number of lines in a file without actually iterating through the file

    R. Joseph Newton wrote: 
    >
    > Well, as Momma used to say:
    > "Just look the other way. Ignore it, and maybe it will go away..."
    >
    > I would not be at all surprised if the code above works, and does *something*.
    > I just prefer to use code that says what it is doing.[/ref]

    The idea with '}{' is brilliant in my opinion. See the "-p" switch
    explaination in perldoc perlrun:

    http://www.perldoc.com/perl5.8.0/pod/perlrun.html#-p

    and substitute the "..." with }{*_=*.}{ to see how it works. Hint: it's
    the same as:

    perl -lpe '}{$_=$.}{'

    As for the code that says what it is doing, here it is:

    perl -le 'while(<>){} print $.'

    Do nothing for every line of input and print the number of lines, just
    like "wc -l" would.

    --
    ZSDC

    Zsdc Guest

  8. #8

    Default CODING STYLE (was Re: Count the number of lines in a file without actually iterating through the file)

    R. Joseph Newton wrote: 
    >>
    >>Huh? Could someone explain this? The "}{" makes no sense to me...[/ref]
    >
    >
    > Well, as Momma used to say:
    > "Just look the other way. Ignore it, and maybe it will go away..."
    >
    > I would not be at all surprised if the code above works, and does *something*.
    > I just prefer to use code that says what it is doing.[/ref]


    And you/Joseph are/is correct :)

    Most employers (and a quiet a few IT managers) are not very Perl savvy
    and would like you Perl people (read POD) to be more like COBOL people
    (read BOOKS.)

    Can we please leave the Perl Golf in the appropriate context or at least
    make a warning in/at the start of the message that the post may
    confuse beginners?

    [Tim Toady Wrote This, not Bill]
    http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?There's+More+Than+One+Way+To+Do+It

    Cheers :)
    -TIMTOWTDI-
    __Sx__________________________________________
    http://youve-reached-the.endoftheinternet.org/
    Wc Guest

  9. #9

    Default Re: CODING STYLE (was Re: Count the number of lines in a file without actually iterating through the file)

    WC -Sx- Jones wrote: 

    I didn't make any warning in my last post. I wrote an explaination
    instead. I hope that's acceptable...

    --
    ZSDC

    Zsdc Guest

  10. #10

    Default Re: CODING STYLE (was Re: Count the number of lines in a file without actually iterating through the file)

    zsdc wrote: 
    >
    >
    > I didn't make any warning in my last post. I wrote an explaination
    > instead. I hope that's acceptable...
    >[/ref]

    of course...

    I what I wrote wasnt a demand =/

    -Bill-
    __Sx__________________________________________
    http://youve-reached-the.endoftheinternet.org/
    Wc Guest

  11. #11

    Default Re: CODING STYLE (was Re: Count the number of lines in a file without actually iterating through the file)

    Wc -Sx- Jones wrote: 

    Don't you mean "we Perl people" or are you inferring that you are not "a
    Perl person?"
     

    If beginners are confused then they just have to ask, as apparently
    someone did.


    :-)

    John
    --
    use Perl;
    program
    fulfillment
    John Guest

  12. #12

    Default Re: CODING STYLE (was Re: Count the number of lines in a file without actually iterating through the file)

    John W. Krahn wrote: 
    >
    >
    > Don't you mean "we Perl people" or are you inferring that you are not "a
    > Perl person?"[/ref]

    I apologize - my humor is always lost upon the Internet.

    :)

    (and yes I am a Perl peep - lots of calories to.)
    -Bill-
    __Sx__________________________________________
    http://youve-reached-the.endoftheinternet.org/
    Wc Guest

  13. #13

    Default Re: CODING STYLE (was Re: Count the number of lines in a file without actually iterating through the file)

    WC -Sx- Jones wrote:
     
    > >
    > >
    > > Well, as Momma used to say:
    > > "Just look the other way. Ignore it, and maybe it will go away..."
    > >
    > > I would not be at all surprised if the code above works, and does *something*.
    > > I just prefer to use code that says what it is doing.[/ref]
    >
    > And you/Joseph are/is correct :)
    >
    > Most employers (and a quiet a few IT managers) are not very Perl savvy
    > and would like you Perl people (read POD) to be more like COBOL people
    > (read BOOKS.)[/ref]

    Geez, and I still can't tell whether I'm a "Perl person". I use Perl as a medium
    for programming, which I do in English. I see POD as doentation for the users of
    modules. That is a rather different function than internal doentation. Tastes
    differ, of course. I even found myself softening a bit when an old friend was
    enthusiastically describing contests for the most compact code. On the whole,
    though, I like the idea of writing code in way that make comments superfluous.
     

    Bingo! Now I remember what he called it! [chuckle] Hey, yeah, rock out, but steer
    the newbies in the direction of coherency, and let them discover the joys of the
    cryptic on their own.

    Joseph

    R. Guest

  14. #14

    Default Re: CODING STYLE (are you a Perl Peep?)


    ''=~('('.'?'.'{'
    . ('`'|'%').('['^"\-").( (
    ( '`'))|'!').('`'|',')."\"". (
    ( '#')).'!'.('{'^'[').'/'.("\["^ (
    ( '.'))).('['^'(').('['^')').'/'.( (
    ( '`'))|'"').('`'|')').('`'|'.').'/' .
    ( '['^'+').('`'|'%').('['^')').('`'| (
    ( ','))).('{'^'[').'-'.('['^',').('!'^ (
    ( '+'))).('!'^'+').('['^'.').('['^'(') .
    ( '`'|'%').('{'^'[').('['^'(').(('[')^ (
    ( '/'))).('['^')').('`'|')').('`'|'#') .
    ( '['^'/').';'.('!'^'+').('!'^('+')).( (
    ( '['))^'+').('['^')').('`'|(')')).( (
    ( '`'))|'.').('['^'/').'<'.'<'.'_'.( (
    ( '`'))^'%').('`'|'.').('`'|'$').( (
    ( '`'))^'/').('`'|'&').('{'^'/') .
    ( '`'|')').('`'|'-').(('`')| (
    ( '%'))).'_'.';'.(('!')^ (
    '+')).('!'^'+').
    ('{'^')')."\.".(
    ( '{')^'[').('`'^"\*").( (
    ( '`'))|'/').('['^'(').('`'| (
    ( '%'))).('['^'+').('`'|('(')).( (
    ( '{'))^'[').('`'^'.').('`'|'%').( (
    ( '['))^',').('['^'/').('`'|('/')).( (
    ( '`'))|'.').('{'^'[').('['^(',')).( (
    ( '['))^')').('`'|'/').('['^'/').('`'| (
    ( '%'))).':'.('!'^'+').'>'.('{'^'[').( (
    ( '`'))^"'").('`'|'%').('`'|'%').('['^ (
    ( '!'))).','.('{'^'[').('`'|'!').('`'| (
    ( '.'))).('`'|'$').('{'^'[').('`'^')') .
    ( '{'^'[').('['^'(').('['^'/').('`'| (
    ( ')'))).('`'|',').('`'|',').(('{')^ (
    ( '['))).('`'|'#').('`'|'!').('`'| (
    ( '.')))."'".('['^'/').('{'^'[') .
    ( '['^'/').('`'|'%').(('`')| (
    ( ','))).('`'|',').('{'^ (
    '[')).('['^',').
    ('`'|'(').("\`"|
    ( '%')).('['^'/').("\`"| (
    ( '('))).('`'|'%').('['^')') .
    ( '{'^'[').('`'^')')."'".(('`')| (
    ( '-'))).('{'^'[').('`'|'!').('{'^ (
    ( '['))).'\\'.'"'.('{'^'+').('`'|'%' )
    . ('['^')').('`'|',').('{'^'[').('[' ^
    ( '+')).('`'|'%').('['^')').('['^'('). (
    ( '`')|'/').('`'|'.').'\\'.'"'.('.').( (
    ( '{'))^'[').('{'^'[').('`'^')').('{'^ (
    ( '['))).('['^'.').('['^'(').('`'|'%') .
    ( '{'^'[').('{'^'+').('`'|'%').(('[')^ (
    ( ')'))).('`'|',').('{'^'[').(('`')| (
    ( '!'))).('['^'(').('{'^'[').(('`')| (
    ( '!'))).('{'^'[').('`'|'-').('`'| (
    ( '%'))).('`'|'$').('`'|(')')).( (
    ( '['))^'.').('`'|'-').('!'^ (
    ( '+'))).'>'.('{'^'[').( (
    '`')|'&').("\`"|
    '/').('['^')').(
    ( '{')^'[').('['^"\+").( (
    ( '['))^')').('`'|'/').('`'| (
    ( "'"))).('['^')').('`'|('!')).( (
    ( '`'))|'-').('`'|'-').('`'|')').( (
    ( '`'))|'.').('`'|"'").','.('{'^'[') .
    ( '['^',').('`'|'(').('`'|')').('`'| (
    ( '#'))).('`'|'(').('{'^'[').('`'^')') .
    ( '{'^'[').('`'|'$').('`'|'/').(('{')^ (
    ( '['))).('`'|')').('`'|'.').('{'^'[') .
    ( '`'^'%').('`'|'.').('`'|"'").(('`')| (
    ( ','))).('`'|')').('['^'(').('`'|'(') .
    ( '.').('{'^'[').('{'^'[').('`'^')') .
    ( '{'^'[').('['^'(').('`'|'%').('`'| (
    ( '%'))).('{'^'[').('{'^'+').('`'^ (
    ( '/'))).('`'^'$').('{'^('[')).( (
    ( '`'))|'!').('['^'(').('{'^ (
    ( '['))).('`'|'$').('`'| (
    '/')).('`'|'#').
    ('['^'.').("\`"|
    ( '-')).('`'|'%').("\`"| (
    ( '.'))).('['^'/').('`'|'!') .
    ( '['^'/').('`'|')').('`'|'/').( (
    ( '`'))|'.').('{'^'[').('`'|'&').( (
    ( '`'))|'/').('['^')').('{'^('[')).( (
    ( '['))^'/').('`'|'(').('`'|('%')).( (
    ( '{'))^'[').('['^'.').('['^'(').('`'| (
    ( '%'))).('['^')').('['^'(').('{'^'[') .
    ( '`'|'/').('`'|'&').('!'^'+').('>').( (
    ( '{'))^'[').('`'|'-').('`'|'/').('`'| (
    ( '$'))).('['^'.').('`'|',').('`'|'%') .
    ( '['^'(').'.'.('{'^'[').('{'^'[').( (
    ( '{'))^'/').('`'|'(').('`'|('!')).( (
    ( '['))^'/').('{'^'[').('`'|')').( (
    ( '['))^'(').('{'^'[').('`'|'!') .
    ( '{'^'[').('['^')').(('`')| (
    ( '!'))).('['^'/').('`'| (
    '(')).('`'|'%').
    ('['^')').("\{"^
    ( '[')).('`'|'$').("\`"| (
    ( ')'))).('`'|'&').('`'|'&') .
    ( '`'|'%').('['^')').('`'|'%').( (
    ( '`'))|'.').('['^'/').('{'^'[').( (
    ( '`'))|'&').('['^'.').('`'|('.')).( (
    ( '`'))|'#').('['^'/').('`'|(')')).( (
    ( '`'))|'/').('`'|'.').('{'^'[').('['^ (
    ( '/'))).('`'|'(').('`'|'!').('`'|'.') .
    ( '{'^'[').('`'|')').('`'|'.').(('[')^ (
    ( '/'))).('`'|'%').('['^')').('`'|'.') .
    ( '`'|'!').('`'|',').('{'^'[').(('`')| (
    ( '$'))).('`'|'/').('`'|'#').(('[')^ (
    ( '.'))).('`'|'-').('`'|'%').(('`')| (
    ( '.'))).('['^'/').('`'|'!').('['^ (
    ( '/'))).('`'|')').('`'|('/')).( (
    ( '`'))|'.').'.'.('{'^'[').( (
    ( '{'))^'[').('{'^'/').( (
    '`')|'!').("\["^
    '(').('['^'/').(
    ( '`')|'%').('['^"\(").( (
    ( '!'))^'+').'>'.('{'^'[').( (
    ( '`'))|'$').('`'|')').('`'|'&') .
    ( '`'|'&').('`'|'%').('['^')').',' .
    ( '{'^'[').('`'|'/').('`'|'&').('{'^ (
    ( '['))).('`'|'#').('`'|'/').(('[')^ (
    ( '.'))).('['^')').('['^'(').('`'|'%') .
    ( '.').('{'^'[').('{'^'[').('`'^')').( (
    ( '{'))^'[').('`'|'%').('['^'-').('`'| (
    ( '%'))).('`'|'.').('{'^'[').('`'|'&') .
    ( '`'|'/').('['^'.').('`'|'.').(('`')| (
    ( '$'))).('{'^'[').('`'|'-').(('[')^ (
    ( '"'))).('['^'(').('`'|'%').(('`')| (
    ( ','))).('`'|'&').('{'^'[').('['^ (
    ( '('))).('`'|'/').('`'|('&')).( (
    ( '['))^'/').('`'|'%').('`'| (
    ( '.'))).('`'|')').('`'| (
    '.')).('`'|"'").
    ('{'^'[').("\`"|
    ( '!')).('{'^'[').("\`"| (
    ( '"'))).('`'|')').('['^'/') .
    ( '{'^'[').('['^',').('`'|'(').( (
    ( '`'))|'%').('`'|'.').('{'^'[').( (
    ( '`'))|'!').('`'|'.').('{'^('[')).( (
    ( '`'))|'/').('`'|',').('`'|('$')).( (
    ( '{'))^'[').('`'|'&').('['^')').('`'| (
    ( ')'))).('`'|'%').('`'|'.').('`'|'$') .
    ( '{'^'[').('['^',').('`'|'!').(('[')^ (
    ( '('))).('!'^'+').'>'.('{'^'[').('`'| (
    ( '%'))).('`'|'.').('['^'/').('`'|'(') .
    ( '['^'.').('['^'(').('`'|')').('`'| (
    ( '!'))).('['^'(').('['^'/').(('`')| (
    ( ')'))).('`'|'#').('`'|'!').('`'| (
    ( ','))).('`'|',').('['^('"')).( (
    ( '{'))^'[').('`'|'$').('`'| (
    ( '%'))).('['^'(').('`'| (
    '#')).('['^')').
    ('`'|')').("\`"|
    ( '"')).('`'|')').("\`"| (
    ( '.'))).('`'|"'").('{'^'[') .
    ( '`'|'#').('`'|'/').('`'|'.').( (
    ( '['))^'/').('`'|'%').('['^'(').( (
    ( '['))^'/').('['^'(').('{'^('[')).( (
    ( '`'))|'&').('`'|'/').('['^(')')).( (
    ( '{'))^'[').('['^'/').('`'|'(').('`'| (
    ( '%'))).('{'^'[').('`'|'-').('`'|'/') .
    ( '['^'(').('['^'/').('{'^'[').(('`')| (
    ( '#'))).('`'|'/').('`'|'-').('['^'+') .
    ( '`'|'!').('`'|'#').('['^'/').(('{')^ (
    ( '['))).('`'|'#').('`'|'/').(('`')| (
    ( '$'))).('`'|'%').'.'.('{'^('[')).( (
    ( '{'))^'[').('`'^'/').('`'|'.').( (
    ( '{'))^'[').('['^'/').('`'|'(') .
    ( '`'|'%').('{'^'[').(('[')^ (
    ( ','))).('`'|'(').('`'| (
    '/')).('`'|',').
    ('`'|'%')."\,".(
    ( '!')^'+').'>'.('{'^'[' )
    . ('['^'/').('`'|'(').("\`"| (
    ( '/'))).('['^'.').('`'|("'")).( (
    ( '`'))|'(').','.('{'^'[').(('`')^ (
    ( ')'))).('{'^'[').('`'|',').(('`')| (
    ( ')'))).('`'|'+').('`'|'%').(('{')^ (
    ( '['))).('['^'/').('`'|'(').('`'|'%') .
    ( '{'^'[').('`'|')').('`'|'$').(('`')| (
    ( '%'))).('`'|'!').('{'^'[').('`'|'/') .
    ( '`'|'&').('{'^'[').('['^',').(('[')^ (
    ( ')'))).('`'|')').('['^'/').('`'|')') .
    ( '`'|'.').('`'|"'").('{'^'[').('`'| (
    ( '#'))).('`'|'/').('`'|'$').(('`')| (
    ( '%'))).('{'^'[').('`'|')').('`'| (
    ( '.'))).('{'^'[').('['^(',')).( (
    ( '`'))|'!').('['^'"').('{'^ (
    ( '['))).('['^'/').('`'| (
    '(')).('`'|'!').
    ('['^'/').("\{"^
    ( '[')).('`'|'-').("\`"| (
    ( '!'))).('`'|'+').('`'|'%') .
    ( '{'^'[').('`'|'#').('`'|'/').( (
    ( '`'))|'-').('`'|'-').('`'|'%').( (
    ( '`'))|'.').('['^'/').('['^('(')).( (
    ( '{'))^'[').('['^'(').('['^('.')).( (
    ( '['))^'+').('`'|'%').('['^')').('`'| (
    ( '&'))).('`'|',').('['^'.').('`'|'/') .
    ( '['^'.').('['^'(').'.'.('!'^('+')).( (
    ( '!'))^'+').('`'^'(').('`'|'%').('`'| (
    ( '('))).('{'^'[').('{'^'[').':'.')'.( (
    ( '!'))^'+').('!'^'+').('{'^('+')).( (
    ( '['))^')').('`'|'/').('`'|("'")).( (
    ( '['))^')').('`'|'!').('`'|'-').( (
    ( '`'))|'-').('`'|')').('`'|'.') .
    ( '`'|"'").('{'^'[').(('[')^ (
    ( ','))).('`'|')').('`'| (
    ',')).('`'|',').
    ('{'^'[').("\`"|
    ( ',')).('`'|')').("\`"| (
    ( '+'))).('`'|'%').('`'|',') .
    ( '['^'"').('{'^'[').('`'|'.').( (
    ( '`'))|'%').('['^'-').('`'|'%').( (
    ( '['))^')').('{'^'[').('`'|('"')).( (
    ( '`'))|'%').('{'^'[').('['^('/')).( (
    ( '`'))|'(').('`'|'!').('['^'/').('{'^ (
    ( '['))).('['^',').('`'|'%').('`'|',') .
    ( '`'|',').('{'^'[').('`'|'$').(('`')| (
    ( '/'))).('`'|'#').('['^'.').('`'|'-') .
    ( '`'|'%').('`'|'.').('['^'/').(('`')| (
    ( '%'))).('`'|'$').'.'.('{'^('[')).( (
    ( '{'))^'[').('{'^'.').('`'|('.')).( (
    ( '`'))|',').('`'|'%').('['^'(').( (
    ( '['))^'(').('{'^'[').('['^'"') .
    ( '`'|'/').('['^'.').(('[')^ (
    ( ')'))).('{'^'[').('`'| (
    '-')).('`'|'%').
    ('`'|'-').("\`"|
    ( '%')).('`'|'/').("\["^ (
    ( ')'))).('['^'"').('{'^'[') .
    ( '!'^'+').('`'|')').('['^'(').( (
    ( '{'))^'[').('['^'/').('`'|'(').( (
    ( '`'))|'%').('{'^'[').('`'|('"')).( (
    ( '`'))|'%').('['^'(').('['^('/')).( (
    ( '{'))^'[').('`'|'/').('`'|'.').('{'^ (
    ( '['))).('['^'/').('`'|'(').('`'|'%') .
    ( '{'^'[').('['^'+').('`'|',').(('`')| (
    ( '!'))).('`'|'.').('`'|'%').('['^'/') .
    ( '{'^'[').('['^'"').('`'|'/').(('[')^ (
    ( '.'))).('{'^'[').('['^',').(('`')| (
    ( ')'))).('`'|',').('`'|',').(('{')^ (
    ( '['))).('['^'-').('`'|'%').('['^ (
    ( ')'))).('['^'"').('{'^('[')).( (
    ( '`'))|',').('`'|')').('`'| (
    ( '+'))).('`'|'%').('`'| (
    ',')).('['^'"').
    ('{'^'[').("\["^
    ( ',')).('['^')').("\`"| (
    ( ')'))).('['^'/').('`'|'%') .
    ( '{'^'[').('`'|'#').('`'|'/').( (
    ( '`'))|'$').('`'|'%').('{'^'[').( (
    ( '['))^',').('`'|'(').('`'|(')')).( (
    ( '`'))|'#').('`'|'(').('{'^('[')).( (
    ( '['))^'.').('['^'+').('`'|'/').('`'| (
    ( '.'))).('{'^'[').('!'^'+').('['^')') .
    ( '`'|'%').('['^'/').('['^'.').(('[')^ (
    ( ')'))).('`'|'.').('`'|')').('`'|'.') .
    ( '`'|"'").('{'^'[').('['^'/').(('`')| (
    ( '/'))).('{'^'[').('['^'"').(('`')| (
    ( '%'))).('`'|'!').('['^')').(('[')^ (
    ( '('))).('{'^'[').('`'|',').('`'| (
    ( '!'))).('['^'/').('`'|('%')).( (
    ( '['))^')').('{'^'[').('['^ (
    ( '('))).('`'|'!').('['^ (
    '"')).('{'^'[').
    ('!'^'+').("\!"^
    ( '+')).'\\'.'"'.(('{')^ (
    ( ','))).('`'|'(').('`'|'!') .
    ( '['^'/').('{'^'[').('['^'/').( (
    ( '`'))|'(').('`'|'%').('{'^'[').( (
    ( '`'))|'(').('`'|'%').('`'|('#')).( (
    ( '`'))|'+').('{'^'[').('['^(',')).( (
    ( '`'))|'!').('['^'(').('{'^'[').('`'^ (
    ( ')'))).('{'^'[').('['^'/').('`'|'(') .
    ( '`'|')').('`'|'.').('`'|'+').(('`')| (
    ( ')'))).('`'|'.').('`'|"'").'?'.'\\'. (
    ( '"')).('!'^'+').('!'^'+').('{'^'+'). (
    ( '`')^'/').('`'^'$').('{'^'[').('`' |
    ( '!')).('`'|'.').('`'|'$').('{'^'[' )
    . ('{'^'+').('`'|'%').('['^"\)").( (
    ( '`'))|',').('{'^'[').('`'|'#') .
    ( '`'|'/').('`'|'$').(('`')| (
    ( ')'))).('`'|'.').('`'| (
    "'")).('{'^'[').
    ('`'|'#').("\`"|
    ( '!')).('`'|'.').("\{"^ (
    ( '['))).('`'|'#').('`'|'/') .
    ( '`'|'%').('['^'#').('`'|')').( (
    ( '['))^'(').('['^'/').'.'.(('{')^ (
    ( '['))).('`'^'!').('`'|'.').(('`')| (
    ( '$'))).('{'^'[').('['^'(').(('`')| (
    ( '('))).('`'|'/').('['^'.').('`'|',') .
    ( '`'|'$').'.'.('!'^'+').('!'^'+').'-' .
    ( '`'^'"').('`'|')').('`'|',').(('`')| (
    ( ','))).'-'.('{'^'[').('!'^'+')."\_". (
    ( '_')).('{'^'(').('['^'#').'_'.('_'). (
    ( '_')).'_'.'_'.'_'.'_'.'_'.'_'.'_'. (
    ( '_')).'_'.'_'.'_'.'_'.'_'.'_'.'_'. (
    ( '_')).'_'.'_'.'_'.'_'.'_'.('_'). (
    ( '_')).'_'.'_'.'_'.'_'.'_'.'_'. (
    ( '_')).'_'.'_'.'_'.'_'.'_'. (
    ( '_')).'_'.'_'.'_'.('!' ^
    '+').('`'|'(').(
    '['^'/').(('[')^
    ( '/')).('['^'+').(':'). (
    ( '/')).'/'.('['^'"').("\`"| (
    ( '/'))).('['^'.').('['^('-')).( (
    ( '`'))|'%').'-'.('['^')').(('`')| (
    ( '%'))).('`'|'!').('`'|'#').(('`')| (
    ( '('))).('`'|'%').('`'|'$').('-').( (
    ( '['))^'/').('`'|'(').('`'|'%').'.'.( (
    ( '`'))|'%').('`'|'.').('`'|'$').('`'| (
    ( '/'))).('`'|'&').('['^'/').('`'|'(') .
    ( '`'|'%').('`'|')').('`'|'.').(('[')^ (
    ( '/'))).('`'|'%').('['^')').('`'|'.') .
    ( '`'|'%').('['^'/').'.'.('`'|'/').( (
    ( '['))^')').('`'|"'").'/'.'='.('`'| (
    ( '#'))).('['^'.').('['^'/').('!'^ (
    ( '+'))).('!'^'+').'_'.('`'^'%') .
    ( '`'|'.').('`'|'$').(('`')^ (
    ( '/'))).('`'|'&').('{'^ (
    '/')).('`'|')').
    ('`'|'-').("\`"|
    ( '%')).'_'.('!'^"\+").( (
    ( '!'))^'+').'_'.'_'.(('`')^ (
    ( '%'))).('`'^'.').('`'^'$').'_' .
    ( '_').('!'^'+').'"'.'}'."\)");$:= (
    ( '.'))^'~';$~=''|'(';$^=')'^'[';$/ =
    ( '`')|'.';$,='('^'}';$\='`'|'!';$:= (
    ( ')'))^'}';$~='*'|'`';$^='+'^"\_";$/= (
    ( '&'))|'';$,='['&'~';$\=','^"\|";$:= (
    ( '.'))^'~';$~=''|'(';$^=')'^"\[";$/= (
    ( '`'))|'.';$,='('^'}';$\='`'|"\!";$:= (
    ( ')'))^'}';$~='*'|'`';$^='+'^"\_";$/= (
    ( '&'))|'';$,='['&'~';$\=','^'|';$: =
    ( '.')^'~';$~=''|'(';$^=')'^'[';$/= (
    ( '`'))|'.';$,='('^'}';$\='`'|'!'; (
    ( $:))=')'^'}';$~='*'|'`';$^='+' ^
    ( '_');$/='&'|'';$,='['&'~' ;
    ( $\)=','^'|';$:='.'^'~' ;
    $~=''|('(');#;#

    Wc Guest

  15. #15

    Default Re: CODING STYLE (are you a Perl Peep?)

    WC -Sx- Jones wrote:
     

    ....
     

    ^Z

    Now that, I must admit, is wa-a-a-a-ay slick! LOL

    Joseph


    R. Guest

  16. #16

    Default Re: CODING STYLE (was Re: Count the number of lines in a file without actually iterating through the file)

    WC -Sx- Jones wrote: 
    >>
    >> I didn't make any warning in my last post. I wrote an explaination
    >> instead. I hope that's acceptable...[/ref]
    >
    > of course...
    >
    > I what I wrote wasnt a demand =/[/ref]

    Of course, I just wanted to make sure other people din't mind I might
    have posted something confusing. But then again, if beginners never
    wanted to get confused, they would probably choose different language...

    --
    ZSDC

    Zsdc Guest

Similar Threads

  1. Count Number of Downloads for PDF File
    By schooloffish in forum Macromedia ColdFusion
    Replies: 3
    Last Post: June 18th, 02:44 AM
  2. Replies: 0
    Last Post: July 25th, 01:55 AM
  3. read lines of file without parsing the lines
    By W. Paulisse in forum PHP Development
    Replies: 3
    Last Post: February 11th, 01:25 AM
  4. Replies: 3
    Last Post: August 13th, 10:15 PM
  5. How to Count File Downloads
    By newhopeinc webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 25th, 08:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139