Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Having a problem with negative look behind assertion

by kcott (Chancellor)
on Feb 12, 2013 at 14:10 UTC ( #1018373=note: print w/replies, xml ) Need Help??

in reply to Having a problem with negative look behind assertion

G'day SirClive,

Another method is to simply skip lines starting with fee then test for [Bb]ar:

$ perl -Mstrict -Mwarnings -E ' my @data = qw{ foo/src/com/stuff/ foo/src/com/stuff/ foo/src/com/stuff/ fee/src/com/stuff/ fee/src/com/stuff/ }; for (@data) { next if /^fee/; say if /[Bb]ar/; } ' foo/src/com/stuff/ foo/src/com/stuff/

-- Ken

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018373]
[PriNet]: quick question... anyone know how to remove all the existing keys in a %hash ? i've tried several options, but when i re-use the hash, some of the "upper" keys that i don't re-use stick and i can't get them to "remove"
[atcroft]: PriNet: %hash = ();? or foreach my $k ( keys %hash ) { delete $hash{$k}; }?

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2017-06-28 02:52 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (619 votes). Check out past polls.