Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Regexp: not what I'd expected

by maverick (Curate)
on Jul 04, 2000 at 05:54 UTC ( #20971=note: print w/replies, xml ) Need Help??


in reply to Regexp: not what I'd expected

$bef[$mid] # is an entry out of the array @bef $mid[$aft] # is an entry out of the array @mid $bef[$mid$aft # is a syntax error becuase there's no ] on the array en +try [$bef] # works because they're no other way to look at the [
Look in the Perl docs about how to use arrays and this will make a lot more sense.
The immediate solution is to put a '\' in front of each '['

/\/\averick

Replies are listed 'Best First'.
RE: Re: Regexp: not what I'd expected
by greenhorn (Sexton) on Jul 04, 2000 at 06:32 UTC
    Aha, I have it. sed did it. I was thinking sed-wise. It wouldn't have cared about the un-escaped brackets in the replacement. (Trying to save face...failing...)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (1)
As of 2022-11-26 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?