I have a directory that has some files named nnnn.xxx.aaa
these files are in an array and after I do some stuff, I need to ftp them to another server with the .aaa extension removed (nnnn.xxx). I thought I could split on . i have something like :
@files = system("ls *.xxx.aaa"
foreach $files (@files){
@file_name = split(/\./, $files);
print "$file_name[0].[1]";
}
no go, whats up, In sed I would just s/.aaa//, don't make me do sumting like system("echo $files|cut -d . -c1-2"
thanks in advance
these files are in an array and after I do some stuff, I need to ftp them to another server with the .aaa extension removed (nnnn.xxx). I thought I could split on . i have something like :
@files = system("ls *.xxx.aaa"
foreach $files (@files){
@file_name = split(/\./, $files);
print "$file_name[0].[1]";
}
no go, whats up, In sed I would just s/.aaa//, don't make me do sumting like system("echo $files|cut -d . -c1-2"
thanks in advance