newatperl has asked for the wisdom of the Perl Monks concerning the following question:
(this string is generated when I upload a file using the upload file form element part of CGI.pm) so that I can grab the file extension of the file. I'm trying to do this byC:\Documents and Settings\Administrator\Desktop\china.txt
but this puts C:\Documents into $junk and nd into $extension. Can anyone help me out with this? Thanks.my $pubupload = $query->param('pubupload'); my ($junk, $extension) = split / ./, $pubupload;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using split on a string
by MeowChow (Vicar) on May 14, 2001 at 07:30 UTC | |
by newatperl (Acolyte) on May 14, 2001 at 07:36 UTC | |
|
Re: using split on a string
by Daddio (Chaplain) on May 14, 2001 at 07:21 UTC | |
|
Re: using split on a string
by damian1301 (Curate) on May 14, 2001 at 07:25 UTC | |
|
Re: using split on a string
by Masem (Monsignor) on May 14, 2001 at 07:23 UTC | |
|
Re: using split on a string
by converter (Priest) on May 14, 2001 at 07:55 UTC | |
|
Re: using split on a string
by jorg (Friar) on May 14, 2001 at 16:33 UTC | |
|
Re: using split on a string
by AidanLee (Chaplain) on May 14, 2001 at 07:39 UTC |