wenD has asked for the wisdom of the Perl Monks concerning the following question:
if ( $incomplete_isbn =~ m/^\d{5}$/ ) { my $re_key = qr/.+$incomplete_isbn.+/; if ( exists $hashref_isbn->{$re_key} ) { print "Found! $incomplete_isbn matches $hashref_isbn->{$re_key +}\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Possible to use an expression as the hash key with exists?
by ikegami (Patriarch) on Sep 18, 2007 at 16:04 UTC | |
by wenD (Beadle) on Sep 21, 2007 at 12:03 UTC | |
|
Re: Possible to use an expression as the hash key with exists?
by Skeeve (Parson) on Sep 18, 2007 at 16:03 UTC | |
|
Re: Possible to use an expression as the hash key with exists?
by dwm042 (Priest) on Sep 18, 2007 at 17:08 UTC |