On Fri, Jan 7, 2011 at 11:11, <[email protected]> wrote: > And give an output file like: > > K:\SDan\Iint Genomics\Spereira\Technology\metrix\07MA7\Mouse\ > 20070305.CEL > > Where whatever is taken after the last "\" is taken as the filename and > the filename is tab separated into a new column from the original line!
You could use regular expression like the following to separate the path from the filename: $line =~ m/(.*)\\([^\\]*)$/ && print "$1\t$2" Or you could just find and replace the last '\' with a tab... $line =~ s/\\([^\\]*)$/\t\1/ && print $line Cheers, Daniel Hedlund [email protected] _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
