CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
easy one..

 



wickedxter
User

May 7, 2001, 8:44 PM

Post #1 of 3 (869 views)
easy one.. Can't Post

ok this might be an easy one..

ok i've got a form with a drop down menu on it.. but when i try to use picked name to open a file it wont b/c it has a space at the end.. and i cant seem to get rid of it....

it's like file .txt

and i need it file.txt

thx..



rjoseph
Novice

May 7, 2001, 10:13 PM

Post #2 of 3 (863 views)
Re: easy one.. [In reply to] Can't Post


Code
my $file = 'file .txt'; 
$file =~ s/\s*?//;

Should work (but someone else check me on that, its late...)

r j o s e p h
"Violence is a last resort of the incompetent" - Foundation


wickedxter
User

May 8, 2001, 6:49 PM

Post #3 of 3 (853 views)
Re: easy one.. [In reply to] Can't Post

thx a bunch !


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives