[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Perl quickie

$dir =~ s/\ //g; should remove space just fine.

$dir shouldn't be declared again. actually it will cause complie-time error.

-----Original Message-----
From: Chris Fowler [mailto:cfowler at outpostsentinel.com]
Sent: Friday, January 16, 2004 11:18 AM
To: ale at ale.org
Subject: [ale] Perl quickie

I'm trying to remove all spaces in a string.

        my $dir = $tag->{GENRE}."/".$info->{ARTIST}."/".$info->{ALBUM};
        my $dir =~ (s/\ /\_/g);
        print $dir."\n";

What is the right way to do it?


Ale mailing list
Ale at ale.org
-------------- next part --------------
An HTML attachment was scrubbed...