perl qstn...
Randal L. Schwartz
merlyn at stonehenge.com
Tue Apr 6 14:28:57 UTC 2010
>>>>> "Giorgos" == Giorgos Keramidas <keramida at ceid.upatras.gr> writes:
Giorgos> This means you can write your sh version like this in Perl:
Giorgos> #!/usr/bin/perl
Giorgos> if (int(@ARGV) == 0) {
Giorgos> die "No args; at least one filename expected";
Giorgos> }
Giorgos> printf("%s\n", join(' ', (@ARGV)));
Which, when you're not speaking Perl with a C accent, expressed more
"natively" as:
@ARGV or die "No args: at least one filename expected";
print "@ARGV\n";
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
More information about the freebsd-questions
mailing list