Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Somehow substr is seen as a string, how do change this behaviour ?$a = 'a b c d' ; $b = 'rstu' ; for ($a) { s/a/substr($b,0,1)/ ; s/b/substr($b,1,1)/ ; ..... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp and a perl function
by davorg (Chancellor) on Feb 27, 2006 at 15:51 UTC | |
|
Re: regexp and a perl function
by borisz (Canon) on Feb 27, 2006 at 15:38 UTC | |
|
Re: regexp and a perl function
by mickeyn (Priest) on Feb 27, 2006 at 15:38 UTC | |
|
Re: regexp and a perl function
by duff (Parson) on Feb 27, 2006 at 15:56 UTC |