Send As SMS

7/27/2006

read a file from the command line in perl

to read in a file and print its contents (filename specified as the first command-line argument):

my($my_file) = $ARGV[0];
open(MYFILE,$my_file);

while ()
{
print $_;
}


0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home

My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://stinkpot.afraid.org:8080/tricks/ and update your bookmarks.