Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Of course, that works fine until the string coming back happens to be 0x30 ... :(if ($rc=$ref->getc) { .... }
won't work because the !~ binds tighter than the "=" (and perhaps it's a little too obscure). I'm just wondering if there is some simple idiom that I'm overlooking. Thanks !if ($rc=$ref->getc!~/./) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Testing for empty string
by chip (Curate) on Mar 19, 2004 at 02:58 UTC | |
|
Re: Testing for empty string
by graff (Chancellor) on Mar 19, 2004 at 03:11 UTC |