I am trying to get out the filenames I haved defined in my $string, but it only prints :
so the first printed line should look like:
cfx5pre -batch test.cse
any help would be great
so the first printed line should look like:
cfx5pre -batch test.cse
any help would be great
Code:
$string = "pre:test.cse;solve:test.def,test.ccl,test.res,test;post:test.cse";
@array = split /;/ , $string;
foreach (@array) {
if (/pre:/) {
print "cfx5pre - batch $1 \n" if /(,|:).*cse/i;
}
if (/solve:/) {
print "cfx5solve - batch $1 " if /(,|:).*def/i;
print "-interpolate-iv $1 " if /(,|:).*res/i;;
print "-name $1 " if /(,|:).*(;|,)/i;
print "-ccl $1 " if /(,|:).*.ccl/i;;
print "\n";
}
if (/post:/) {
print "cfx5post - batch $1 " if /(,|:).*cse/i;;
}
}