One reason is that you can make runtime use/require calls, as well as run-time function definitions with eval.
For example use strict; my $subname = 'contrived'; eval qq(sub $subname { print "This could be useful\n" }); contrived(); This may seem highly contrived (it is), but there are useful examples of this as well, for instance in making factory classes. George Nikola Janceski wrote: >WTF doesn't perl -c check for valid subroutines/function calls? > >I can write a perlscript calling a function that doesn't exist but perl -c >will say syntax ok. >ie: >% perl -ce "nothing_here('some junk')" >-e syntax OK > >% perl -e "nothing_here('some junk')" >Undefined subroutine &main::nothing_here called at -e line 1. > >That doesn't make sense! >It should check function calls at compile time, correct? >So why not for -c? > >Excuse me if I have overstepped my bounds. I still love Perl regardless, but >it can be better. > >Nikola Janceski > >The significant problems we face today cannot be solved at the same level of >thinking we were at when we created them. >-- Albert Einstein (1879-1955) > > >PS. I still drool over the apocalypse papers on Perl 6. I can't wait! > >---------------------------------------------------------------------------- >-------------------- >The views and opinions expressed in this email message are the sender's >own, and do not necessarily represent the views and opinions of Summit >Systems Inc. > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]