for(my $i=0;$i<4;$i++) { my $file = $q->param('pic_'.$i); my @full = split(/(\\)|(\/)/,$file); my $filename = pop(@full); $filename =~ s/\n//; $filename =~ s/\r//; $filename = $username_pic."_".$filename; #$filename=~s/^([^_]+_)(.*)(\.\w{3})\z/$1.md5_hex($2).$3/eg; my $md5 = md5_hex( $filename ); $filename =s[_(\d+).jpg$][_$md5.jpg]; }
In reply to Re^6: Renaming an image file
by Anonymous Monk
in thread Renaming an image file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |