| somian | s/match/regexp/ |
| Botje | escape them? |
| somian | Use single quotes as the regexp expression delimiter. That's got to be in the vicinity of the "Quote and quote-like operators" section of the manual s/section/area/ |
| ImKidd | escaping is what I've been doing: s/\$/\\\$/g ; s/\?/\\\?/g ..... |
| action | CPAN upload: App-BackupAndRestore-0.02 by HOOO |
| CPAN | upload: App-BackupAndRestore-0.02 by HOOO |
| action | CPAN upload: App-BackupAndRestore-0.03 by HOOO |
| CPAN | upload: App-BackupAndRestore-0.03 by HOOO |
| somian | Escaping is not always the answer. You can run but you can never outrun yourself. |
| sbingner | somian, I did that before I fell on my face as soon as I did it though |
| somian | Heh ;-) |
| ImKidd | in fact I would need a 1level iterpolation, so I need to m/$var/ but $var can contain Dollars I don't wanna interpolate :) |
| sbingner | ImKidd, uh... it doesn't ImKidd, perl -e '$test = "\$t2"; $t2 = 2; $test =~ s/$t2//; print "$test\n";' <-- prints "$t" |
| ImKidd | nice example sbingner, I don't want exactly this, but now I hve the pointer to work on it . thx |
| the_man_mountain | ggg haha my little bro type those stupid little bro lol |
| loiic | Hi how to you cast a variable to a numeric value? i'd like to check if my input is equal to 0 1 2 3 4, what's the easiest way to do it |
| Sir_J | for ... (0..4) ? |
| loiic | i'd like to avoid checking if $var == 0 || $var == 1|| etc |
| whoever | eval: $foo = "0"; if ($foo == 0) return "zero"; return "not zero"; |
| buubot | whoever: Error: syntax error at eval line 1, near ") return" |
| f3ew | just use the numeric operator |
| whoever | eval: $foo = "0"; if ($foo == 0) { return "zero"; } return "not zero"; |
| buubot | whoever: zero |
| f3ew | whoever, missing }{ |
| whoever | sry, too much C# at work :p |
| loiic | f3ew: numeric operator trigger an error if the value isnt numeric |
| whoever | loiic: eval: $foo = "0"; if ($foo =~ m/\d+/) { return "numeric"; } return "not numeric"; |
| buubot | loiic: numeric |
| Botje | crack a nut with a sledgehammer: $var =~ /^[01234]$/ |
| f3ew | Botje, TMTOWTDI |
| Botje | lies. |
| Sir_J | I'm trying to compile app which uses perl http://rafb.net/p/DBojAA92.html <-- that perl package I need ? |