I have a program which can require several arguements. I use the join command then parse out data I recognize.
the scrip snip below is what I use to grab the filename. I'm not sure why it won't accept full pathing such as "D:\utility\filename.txt" which comes out as just "D"
if ($input =~ m/-[oO] (\w+\.?\w*)/) { # fileout
$fileout = $1;
$input =~ s/\s*(\-[oO])\s*//;
$input =~ s/$fileout//i;
print "Fileout: $fileout\n";
open (OUT,">$fileout" || die "can't open $fileout: $!";
$o = 1;
select OUT;
}
As I look at this, I'm thinking that the word boundaries are defined as only alpha characters?
the scrip snip below is what I use to grab the filename. I'm not sure why it won't accept full pathing such as "D:\utility\filename.txt" which comes out as just "D"
if ($input =~ m/-[oO] (\w+\.?\w*)/) { # fileout
$fileout = $1;
$input =~ s/\s*(\-[oO])\s*//;
$input =~ s/$fileout//i;
print "Fileout: $fileout\n";
open (OUT,">$fileout" || die "can't open $fileout: $!";
$o = 1;
select OUT;
}
As I look at this, I'm thinking that the word boundaries are defined as only alpha characters?