 |
User since: |
Mar 03, 2004 at 09:25 UTC
(20 years ago) |
Last here: |
Mar 29, 2021 at 22:51 UTC
(3 years ago) |
Experience: |
4393
|
Level: | Priest (14) |
Writeups: |
459
|
Location: | The Netherlands |
User's localtime: |
Oct 04, 2023 at 05:34 CEST
|
Scratchpad: |
View
|
For this user: | Search nodes |
|
My nodes that made it to the front page
Ways to find out if $scalar is numeric
tye and me having a little fun in the chatterbox.
[muba]: my $is_string = ($scalar ^ $scalar) eq ("$scalar" ^ "$scalar");
[tye]: my $isNumber = $scalar ^ '00' eq $scalar;
[tye]: my $isNumber = do { my $warn= 0; local $SIG{__WARN__}= sub { $warn= 1 }; use warnings; $scalar^=''; $warn };
[tye]: my $isNumber = ( $scalar ^ "$scalar" ) =~ /\d/;
|