> I wrote a simple perl script and execute it as follows: "./sr /tmp/*" > > #!/usr/bin/perl > print $ARGV[0]; > > Well, what is returned is the first filename in the directory, instead > of the actual argument itself. What can I do to get the literal > argument? >
/tmp/* got expanded into a list of filenames matching that glob by the shell long before Perl got involved. You need to escape or quote your arguments such that the shell won't glob filenames before launching your script. ./sr "/tmp/*" -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to place them into the correct order. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/