Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Pattern problem

by spadacciniweb (Deacon)
on Jan 27, 2006 at 14:21 UTC ( #525976=note: print w/ replies, xml ) Need Help??


in reply to Pattern problem

Why
$text =~ /Host System (?!#)/
??

Correct:
$text =~ /Host System [^#]/


Comment on Re: Pattern problem
Select or Download Code
Re^2: Pattern problem
by ikegami (Pope) on Jan 27, 2006 at 18:51 UTC

    $text =~ /Host System (?!#)/ is correct too. However, [^#] is probably faster and an acceptable replacement in this case.

    The problem is
    if $text =~ /Host System (?!#)/ next;
    was used instead of
    if ($text =~ /Host System (?!#)/) { next; }
    or
    next if ($text =~ /Host System (?!#)/);
    or
    next if $text =~ /Host System (?!#)/;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://525976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-10-25 19:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (147 votes), past polls