I have several image files that end in ".tga". they are used as source files for another program. I would like to display them in a table on a webpage. I think I need a regular expression to convert these endings. I have tried a few without success
$skin[$num]=~ s/.tga/.gif/;
or
$skin[$num]=~ tr/.tga/.gif/;
These filenames are listed in an array that is created like this
opendir(THISDIR, "$data_dir" or die "unable to open : $!";
@skin= readdir THISDIR;
close THISDIR;
My planned output is using a while statment to pass over the array. It works well but I was also wondering is there an easier way to slice an array?
$skin[$num]=~ s/.tga/.gif/;
or
$skin[$num]=~ tr/.tga/.gif/;
These filenames are listed in an array that is created like this
opendir(THISDIR, "$data_dir" or die "unable to open : $!";
@skin= readdir THISDIR;
close THISDIR;
My planned output is using a while statment to pass over the array. It works well but I was also wondering is there an easier way to slice an array?