Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Detecting an undefined hash key

by massa (Hermit)
on Oct 03, 2008 at 14:55 UTC ( [id://715208]=note: print w/replies, xml ) Need Help??


in reply to Detecting an undefined hash key

what you want is getopts (with an S), not getopt:
use strict; use warnings; use Getopt::Std; getopts 'st', \my %opt; my $test = $opt{t} || !$opt{s}; unless( $opt{t} || $opt{s} ) { print "Reading from site test file\n"; open my $t, '<', 'test' or die "Can't open site test file: $!"; local $_ = <$t>; print; $test = ! /0/ ### I would rather say $test = !!$_ }
[]s, HTH, Massa (κς,πμ,πλ)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2025-12-07 16:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (86 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.