Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: perl not going to error path

by stevieb (Canon)
on Jan 23, 2016 at 18:21 UTC ( #1153479=note: print w/replies, xml ) Need Help??


in reply to Re^2: perl not going to error path
in thread perl not going to error path

"So i should check to make sure that the value is numeric before passing it to seek"

You can, yes. Doing it this way will allow you to handle the error yourself:

my $offset = 'blah'; if ($offset =~ /^[0-9]+$/){ seek $fh, $offset, 0; } else { die "offset needs to be numeric"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2022-05-20 23:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (76 votes). Check out past polls.

    Notices?