-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I want to replace an expression abc1234 to abc-1234 how can i do
I 've tried
s/......./$1$2$3-$4$5$6$7/ but it dont work.
Please help ?
In order for $1 (etc) to work, the left-hand side of the expression needs
to have parentheses in it. For example:
s/(.)(.)(.)(.)(.)(.)(.)/$1$2$3-$4$5$6$7/
should do the trick for you.
The following:
s/(...)(....)/$1-$2/
does the same thing (effectively), but is shorter and easier to write.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBP4IFtWPeouIeTNHoEQKECgCgwuDkBaMvCKw/oyw2eo7TCgcd1W4AoM2U
/nwmtz5QEnAVUVQjogosdg0F
=Du8q
-----END PGP SIGNATURE-----