am writing a simple substitutes program where both parameter of substitute are stored in variables
When i execute that, it gives me the following output#!/usr/local/bin/perl $string = '10 09'; $regex = '(\d+) (\d+)'; $replace = '$2 $1'; $string =~ s/$regex/$replace/; print "$string \n"; -----------------------
# ./test.cgi $2 $1
In reply to regular expression problem by perl_fan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |