TECTED]>
To: "beginners-cgi" <[EMAIL PROTECTED]>
Sent: Monday, December 23, 2002 7:08 PM
Subject: RE: File upload - probably simple..
If you're only uploading jpgs then you could also write this as
my ($name) = $path =~ /\w+\.jpg$/i;
since a regexp match returns an array,
grabbing various
elements out of a match ie. to grab the filename and extension you'd use:
my ($name, $ext) = $path =~ /(\w+)\.(\w+)$/i;
good luck.
-p
-Original Message-
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 22, 2002 10:17 AM
To: james lu
Use regular expressions to get only the file name from the path.
You should use something like this:
$path =~ s/^.*[\\\/]//;
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
- Original Message -
From: "james lundeen" <[EMAIL PROTECTED]>
To: "beginners-cgi" <[EMAIL P