Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Splitting blunder

by perigeeV (Hermit)
on Apr 08, 2002 at 19:00 UTC ( [id://157521]=note: print w/replies, xml ) Need Help??


in reply to Splitting blunder

I always run to modules when I have regexp problems:

#!/usr/bin/perl -w use strict; use File::Basename; my $fullpath = '\\Server\dir\user'; my $popped; my @fileparts; while($fullpath ne "" && ($popped = basename($fullpath)) ) { push @fileparts, $popped; $fullpath = dirname($fullpath); } for(@fileparts) {print "$_\n"}
It does what you want, but without splitting. I don't know if that's acceptable for you.


Replies are listed 'Best First'.
Re: Re: Splitting blunder
by helmex (Initiate) on Apr 08, 2002 at 23:26 UTC
    Thanks for all the leads.
    TYPO - I did escape the backslashes, posted wrong sorry
    %^+^%

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://157521]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-29 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found