Gossamer Forum
Home : General : Perl Programming :

Chopping white space out... how?

Quote Reply
Chopping white space out... how?
Ok, My problem is this little white space at the end of my variables... I need to figure out howto get rid of it, how would I through pattern matching?

The variable with the whitespace at the end is for displaying a graphic.. so I have:

Code:
<img src="blah_3000 .gif">
/\
(Space)

IE doesn't mind the space, it still displays the images... It's netscape that doesn't like them.. I've also created doubles of each graphic to make sure, by renaming the gfx to 'blah_3000 . gif'

How would I chop the whitespace from lets say:
Code:
$blah = "blah_3000 "

Cuz what I do is append the .gif to it...
Code:
$gfx = $blah . ".gif";

so the problem is in $blah right away...

Any help would be appreciated.

Thanks...
--Jacob
jacob@123webmaster.com

Subject Author Views Date
Thread Chopping white space out... how? jacowhee 10431 Jul 16, 1999, 5:10 AM
Thread Re: Chopping white space out... how?
pugdog 10296 Jul 16, 1999, 5:50 AM
Thread Re: [pugdog] Chopping white space out... how?
Gypsypup 10191 Mar 16, 2004, 4:49 PM
Post Re: [Gypsypup] Chopping white space out... how?
Andy 10206 Mar 17, 2004, 2:34 AM
Post Re: Chopping white space out... how?
jacowhee 10306 Jul 18, 1999, 6:58 AM