Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Double bonus: #!/usr/bin/perl -w

    (Actually, I bet you really have a blank line before the while loop, but that you're not being that evil in the nature of your question.)

    Global Thermonuclear War Bonus:

    • $_, obviously
    • @ARGV, via <>
    • $ARGV to get the name of the file you're processing
    • $. to get the number of lines read from that file
    • $|, just because it's there, and it affects what you'll see before the script craps out
    • $/, untouched (probably), to let you read your files line-by-line