in reply to Okay, I know why is it failing
in thread This regular expression has me stumped
use strict; use warnings; my $file; foreach $file (@ARGV) { open (INFILE,"<$file") or die "Cannot open Input file\n"; while (<INFILE>) { s!(?:^|\w*/|\.\./)[^\s,@;:]*(?<=/)([^\s,@;:]+?)(?=[\s,@;:]|$)! +$1!g; # s!\.\.!!g; print "$_"; } close INFILE; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Okay, I know why is it failing
by tachyon-II (Chaplain) on May 02, 2008 at 09:34 UTC | |
by tsk1979 (Scribe) on May 03, 2008 at 09:17 UTC | |
by tachyon-II (Chaplain) on May 03, 2008 at 12:24 UTC |