Preserved Topic: Replacing and filtering scalars in Perl |
|
---|---|
Author | Thread |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 06-21-2002 12:21
How do all those nifty shorthand find-n-replace and filtering lines in Perl? |
Nervous Wreck (II) Inmate From: Indianapolis, In USA |
posted 06-21-2002 13:55
Regular expressions are on of Perl's many cool tools. Here's a good tutorial that's easy to understand: |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 06-21-2002 15:45
oo.. neat-o keen! things got a lot easier when I figured out that they were called regexes.. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-21-2002 16:48
what to you mean by replace? |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 06-21-2002 16:49
oh, I see... |
Bipolar (III) Inmate From: USA! USA! USA! |
posted 06-21-2002 20:19
The /o flag actually causes the regular expression containing variables to be compiled only once. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 06-21-2002 21:37
/g is usually the only flag I use. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-22-2002 02:34
whoops my bad like Slime I mostly only use g and i. |