Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

RE: RE: Re: Using backticks with (mount):

by mikfire (Deacon)
on Jul 18, 2000 at 17:11 UTC ( [id://22983]=note: print w/replies, xml ) Need Help??


in reply to RE: Re: Using backticks with (mount):
in thread Using backticks with (mount):

Why shouldn't it? The value is indeterminate when no error has occurred. You are seeing, effectively, /dev/random. There is no deeper mystery here, to my understanding.

mikfire

  • Comment on RE: RE: Re: Using backticks with (mount):

Replies are listed 'Best First'.
RE: RE: RE: Re: Using backticks with (mount):
by tye (Sage) on Jul 18, 2000 at 20:48 UTC

    No, it isn't random. Yes, you shouldn't depend on it.

    In this case, I'm willing to bet that Perl has code that tries to seek, perhaps to more portably flush buffers. It is perfectly acceptable to try to seek and then see whehter or not it worked in order to tell if you happen to have a file handle to a stream that supports seeking.

    $! actually starts out as zero in a new process (no, I don't think this is guarenteed anywhere) but quickly gets changed when something deep in the guts of some library does something that fails.

    And indeterminate means it could be undef or "Illegal seek" or anything else.

RE: RE: RE: Re: Using backticks with (mount):
by BBQ (Curate) on Jul 18, 2000 at 17:23 UTC
    Well, maybe you're right! Maybe it should... BUT! ;)

    If its called $OS_ERROR, one might expect it to start off undef until some OS errors actually occur. With Illegal Seek, common sense would tell me that OS errors have occured! I guess that's what confuses most people. Indeterminate should be undef, and not Illegal Seek, IMHO.

    #!/home/bbq/bin/perl
    # Trust no1!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found