How do I look for specific text in a variable?
Continuing from log parsing discussion.
Last question, then I shuddap.
Name:
Anonymous2007-01-18 16:22
if ($variable =~ /specific text/) {
# are you too fucking lazy to read some books on Perl?
}
Name:
Anonymous2007-01-18 16:25
Given that its perl you are working with, I'm pretty sure you'll want to use regular expressions. Something like /s/text or something. Also I suck at regexp, and I hate it because it looks different wherever its implemented.
>>1 >>2 >>3 >>4
Wow. /prog/ is fast today. What happened?
Name:
Sol2007-01-18 16:36
>>2
Yup. Not too lazy to google for it, though, and the method I ended up using was pretty much exactly like this. Stupid here decides to google something after posting here instead of before.
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy