Re: File upload - probably simple..

2002-12-23 Thread Octavian Rasnita
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,

RE: File upload - probably simple..

2002-12-23 Thread Peter Kappus
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

Re: File upload - probably simple..

2002-12-22 Thread Octavian Rasnita
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