in reply to splitting on win32 linefeeds aka pass the crackpipe!
Update: Mea culpa. I wasn't paying attention to the .* in the regex. Sigh. But I'll leave my post intact, to preserve my mistake for posterity...
Off topic, but:
...is pretty ugly. If you're trying to trim a trailing slash, it's easier to read like this:my $file = $filename; # can't remember why I do this, always +have $file =~ s!^.*(\\|\/)!!; # something about cleaning stuff up
If you can't tell what your own regex is doing, it's time to clean it up.my $file = $filename; $file =~ s![\\/]$!!;
buckaduck
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: splitting on win32 linefeeds aka pass the crackpipe!
by chipmunk (Parson) on Feb 14, 2002 at 04:05 UTC | |
Re: Re: splitting on win32 linefeeds aka pass the crackpipe!
by vek (Prior) on Feb 14, 2002 at 05:14 UTC |
In Section
Seekers of Perl Wisdom