http://www.perlmonks.org?node_id=592801


in reply to Re^7: Sorting names using Regular Expressions and placing them in different Files.
in thread Sorting names using Regular Expressions and placing them in different Files.

Try working up a very basic case to narrow down the functionality you are having trouble with. Something like this:

use strict; use warnings; my $var = "-rw-rw-rw- 1 bsmbin bsmbin 303 Dec 4 23:00 BSC-200412041100 +00 -rw-rw-rw- 1 bsmbin bsmbin 303 Dec 4 23:00 20041204110000"; my ($transformed) = $var=~s/BSC-//; print $var . " " . $transformed . "\n";

--------------------------------------------------------------

"If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."
John Brunner, "The Shockwave Rider".