in reply to Re: TIMTOWTDI Challenge: Open a file
in thread TIMTOWTDI Challenge: Open a file

I'm pretty fond of the diamond operator and just feeding a filename to the script when it's called.

#!/usr/bin/perl while (<>) { # do stuff }

and . . .

$ script.pl filename

I guess it's the KISS principle applied to getting data from a file.

print substr("Just another Perl hacker", 0, -2);
- apotheon
CopyWrite Chad Perrin