You need to be aware that split works on a regexp therefore the /./ is
matching any character. I'm not sure what you vars $projectnumber and $pa
are but I'll assum you want something like this
$string = '500/00-7.1.19.3';
# This will split the whole string at once retaining only the digits for
Your RE
$string =~ s/\||/\|/g;
First the second pipe is not escaped so it maintains its "or-ness"
So the match part of your RE is backslash or nothing (or null/nil if you
like)
nil matches before and after each real character, for the matches or
backslash
you're simply substituting backslash
Try
Eh?
my $IN = open("my.in.file") or die "Horrible death";
while (<$IN>) {
s/\A\^\[//;
# Do stuff
}
-Original Message-
From: Craig Sharp [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 1:04 PM
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] URGENT Regex problem