in reply to How do I pass $1 to s///?
backreferences in perlre are used to be written \1, \2 ... tweetiepooh informs me that my perldoc used was outdated... and ikegami again corrects that.
Update: your programme prints "This is fish".
What did you expect it to print? "This is fish 1"?
Further update: see ikegami's solution below.
Third and then fourth update - in italics
Cheers, Sören
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I pass $1 to s///?
by ikegami (Patriarch) on Jan 06, 2006 at 17:42 UTC | |
|
Re^2: How do I pass $1 to s///?
by tweetiepooh (Hermit) on Jan 06, 2006 at 17:09 UTC | |
|
Re^2: How do I pass $1 to s///?
by Anonymous Monk on Jan 06, 2006 at 17:03 UTC |