Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: "use strict" sets $!

by superfrink (Curate)
on Aug 19, 2009 at 22:30 UTC ( #789959=note: print w/ replies, xml ) Need Help??


in reply to Re: "use strict" sets $!
in thread "use strict" sets $!

I ran a couple strace commands:

strace -o strace.out -ff perl -lwe 'use strict; print qq($!)' strace -o strace.out.2 -ff perl -lwe 'print qq($!)'
I ran grep ' E' on each output file to check for system calls that returned an error. (This may not find all errors.) Here is the diff. The lines starting with < are in the strace from running with use strict;.
[chad@chad-laptop ~/x]$ diff 1 2 21,53c21,27 < stat64("/usr/local/lib/site_perl/5.10.0/i486-linux-gnu-thread-multi" +, 0xbfe70cf0) = -1 ENOENT (No such file or directory) < stat64("/usr/local/lib/site_perl/5.10.0", 0xbfe70cf0) = -1 ENOENT (N +o such file or directory) < stat64("/usr/local/lib/site_perl/i486-linux-gnu-thread-multi", 0xbfe +70cf0) = -1 ENOENT (No such file or directory) < _llseek(0, 0, 0xbfe70b60, SEEK_CUR) = -1 ESPIPE (Illegal seek) < _llseek(1, 0, 0xbfe70b60, SEEK_CUR) = -1 ESPIPE (Illegal seek) < _llseek(2, 0, 0xbfe70b60, SEEK_CUR) = -1 ESPIPE (Illegal seek) < ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfe70be8) = -1 ENOTTY (Ina +ppropriate ioctl for device) < stat64("/etc/perl/strict.pmc", 0xbfe7090c) = -1 ENOENT (No such file + or directory) < stat64("/etc/perl/strict.pm", 0xbfe70884) = -1 ENOENT (No such file +or directory) < stat64("/usr/local/lib/perl/5.10.0/strict.pmc", 0xbfe7090c) = -1 ENO +ENT (No such file or directory) < stat64("/usr/local/lib/perl/5.10.0/strict.pm", 0xbfe70884) = -1 ENOE +NT (No such file or directory) < stat64("/usr/local/share/perl/5.10.0/strict.pmc", 0xbfe7090c) = -1 E +NOENT (No such file or directory) < stat64("/usr/local/share/perl/5.10.0/strict.pm", 0xbfe70884) = -1 EN +OENT (No such file or directory) < stat64("/usr/lib/perl5/strict.pmc", 0xbfe7090c) = -1 ENOENT (No such + file or directory) < stat64("/usr/lib/perl5/strict.pm", 0xbfe70884) = -1 ENOENT (No such +file or directory) < stat64("/usr/share/perl5/strict.pmc", 0xbfe7090c) = -1 ENOENT (No su +ch file or directory) < stat64("/usr/share/perl5/strict.pm", 0xbfe70884) = -1 ENOENT (No suc +h file or directory) < stat64("/usr/lib/perl/5.10/strict.pmc", 0xbfe7090c) = -1 ENOENT (No +such file or directory) < stat64("/usr/lib/perl/5.10/strict.pm", 0xbfe70884) = -1 ENOENT (No s +uch file or directory) < stat64("/usr/share/perl/5.10/strict.pmc", 0xbfe7090c) = -1 ENOENT (N +o such file or directory) < ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfe70698) = -1 ENOTTY (Ina +ppropriate ioctl for device) < open("/usr/share/locale/en_CA.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) += -1 ENOENT (No such file or directory) < open("/usr/share/locale/en_CA.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = + -1 ENOENT (No such file or directory) < open("/usr/share/locale/en_CA/LC_MESSAGES/libc.mo", O_RDONLY) = -1 E +NOENT (No such file or directory) < open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = - +1 ENOENT (No such file or directory) < open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 + ENOENT (No such file or directory) < open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOE +NT (No such file or directory) < open("/usr/share/locale-langpack/en_CA.UTF-8/LC_MESSAGES/libc.mo", O +_RDONLY) = -1 ENOENT (No such file or directory) < open("/usr/share/locale-langpack/en_CA.utf8/LC_MESSAGES/libc.mo", O_ +RDONLY) = -1 ENOENT (No such file or directory) < open("/usr/share/locale-langpack/en_CA/LC_MESSAGES/libc.mo", O_RDONL +Y) = -1 ENOENT (No such file or directory) < open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libc.mo", O_RD +ONLY) = -1 ENOENT (No such file or directory) < open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libc.mo", O_RDO +NLY) = -1 ENOENT (No such file or directory) < open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) += -1 ENOENT (No such file or directory) --- > stat64("/usr/local/lib/site_perl/5.10.0/i486-linux-gnu-thread-multi" +, 0xbfb1b1a0) = -1 ENOENT (No such file or directory) > stat64("/usr/local/lib/site_perl/5.10.0", 0xbfb1b1a0) = -1 ENOENT (N +o such file or directory) > stat64("/usr/local/lib/site_perl/i486-linux-gnu-thread-multi", 0xbfb +1b1a0) = -1 ENOENT (No such file or directory) > _llseek(0, 0, 0xbfb1b010, SEEK_CUR) = -1 ESPIPE (Illegal seek) > _llseek(1, 0, 0xbfb1b010, SEEK_CUR) = -1 ESPIPE (Illegal seek) > _llseek(2, 0, 0xbfb1b010, SEEK_CUR) = -1 ESPIPE (Illegal seek) > ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfb1b098) = -1 ENOTTY (Ina +ppropriate ioctl for device)
Maybe the difference is related to the language settings or the ioctl on file descriptor 4. The strace output shows:
open("/usr/share/perl/5.10/strict.pm", O_RDONLY|O_LARGEFILE) = 4 ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfe70698) = -1 ENOTTY (Inapp +ropriate ioctl for device) _llseek(4, 0, [0], SEEK_CUR) = 0
Update: I'm running perl 5.10.0 on Ubuntu 9.04.


Comment on Re^2: "use strict" sets $!
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://789959]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-08-23 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (178 votes), past polls