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 [^#]/

Replies are listed 'Best First'.
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?
[SuicideJunkie]: Parse a serial number from a register. But it is humans that type it in originally.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2016-12-07 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (131 votes). Check out past polls.