>>>>> "Gary" == Gary Kline <kl...@thought.org> writes:
Gary> #!/usr/bin/perl Gary> $argc = @ARGV; Gary> if (! $argc ) { Gary> printf("No args; need filename.\n"); Gary> } Gary> else { Gary> printf("%s\n", @ARGV); Gary> } Even simpler: if (@ARGV) { print "No args\n"; } else { print "arg is $ARGV[0]\n"; } If you're studying perl, you might want to join the very beginner-friendly mailing list, info at http://lists.perl.org/list/beginners.html, or start a conversation on perlmonks.org, also relatively beginner-friendly. And I'd recommend a couple of good books, but I might be seen as self-pimping. :) But if you look at http://learn.perl.org/ you'll see a number of other resources, including free tutorials online. print "Just another Perl hacker,"; # the original -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <mer...@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 _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"