in reply to Regex problem
If I understand your question correctly, the problem isn't with your s///, it's with your initialisation of $value. It should be single-quoted, not double.
my $value = 'sample1\*sample2\*sample3*sample4*sample5'; $value =~ s#\*#STAR#g; print $value
Output:
sample1\STARsample2\STARsample3STARsample4STARsample5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex problem
by roboticus (Chancellor) on Aug 02, 2007 at 23:13 UTC | |
by ikegami (Patriarch) on Aug 03, 2007 at 00:14 UTC |