Berkeley CSUA MOTD:Entry 18151
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/12/25 [General] UID:1000 Activity:popular
12/25   

2000/5/2-3 [Computer/SW/Languages/Perl] UID:18151 Activity:moderate
4/32    Trying to use POSIX.pm in perl.  I have:
>>      #!/usr/bin/perl
>>      use POSIX;
        But perl complains
>>      syntax error in file .//wparse at line 2, next 2 tokens "use POSIX"
        What am I doing wrong?
        \_ '/usr/bin/perl -v' will tell you. use /usr/local/bin/perl{5}
        \_ Not sure, but as a side note: POSIX.pm has tons of stuff; just
           import what you need, e.g.:
           use POSIX qw(strftime setsid);       ##dbushong
        \_ I switched to /usr/local/bin/perl and it works fine.  Any ideas as
           to why we have two perl binaries?  I thought the parsers were very
           backwards-compatible.  Perhaps one should be deleted? -- Thanks
                \_ Perl 5 is not completely backwards compatibile with 4.
                   Many common scripts have to be updated to use Perl 5.