so cool. I'm using Brian Ingerson's IO:ALL to slurp some files
May want to look at File::Slurp also, its highly efficient, may help :)
Beer? I'm all over that! I gotta get out of here early (before 8:00 PM) today because Bush is giving the State of the Union at the Capital...about 4 blocks away.
Mark>>> Steven Lembark <[EMAIL PROTECTED]> 31-Jan-06 12:34:18 PM >>>
> this kind of question would best go to your local perl monge
Thanks to all (even the flames : -) ) who suggested:
perldoc File::Basename; perldoc File::Spec;I just got a new job programming Perl 5.8.7. My last Perl experience was 10 years ago with 5.0, and my regex is rusty. Not that I ever liked regex to begin with, which is why File::Spec and
> this kind of question would best go to your local perl mongers chapter
Er... no. Unless the issue is splitting up a
path to the nearest beer, I'd suggest keeping
it out of ny.pm.org :-)
--
Steven Lembark 85-09 90th Street
Workhorse Computing
> Better yet, somebody please profer a solution? :-)
perldoc File::Basename;
perldoc File::Spec;
--
Steven Lembark 85-09 90th Street
Workhorse ComputingWoodhaven, NY 11421
[EMAIL PROTECTED]
Mark Galbreath <[EMAIL PROTECTED]> wrote:
> Close enough to perl, I hope...
>
> I'm trying to string the filename from the path:
>
>/dir/subdir/file.ext => file.ext
>
> with
>
> /\w+\.\w+$/
>
> and am getting the entire path returned. I am falling asleep reading the
> perldoc regex
or $bla=~/([^\/]+)$/; in case the filenames have non-alpha chars or more
dots...
Tom Schindl wrote:
on the other hand:
my $bla = "/dir/subdir/file.ext";
$bla =~ /(\w+\.\w+)$/;
print $1 . "\n"; # file.ext
works perfectly
On 1/31/06, Mark Galbreath <[EMAIL PROTECTED]> wrote:
>
> Close enough to perl, I hope...
this kind of question would best go to your local perl mongers chapter
but anyway, I'll break the rules for someone from the General Accounting
Office on the occasion of the retirement of Mr. Greenspan...
>
Mark Galbreath wrote:
> Close enough to perl, I hope...
not really, but we'll forgive you.
>
> I'm trying to string the filename from the path:
>
>/dir/subdir/file.ext => file.ext
see File::Spec::splitpath()
:)
--Geoff
Too Cool!! Thanks, Tom!
mark>>> Tom Schindl <[EMAIL PROTECTED]> 31-Jan-06 12:06:22 PM >>>
man File::Spec ;-)Mark Galbreath wrote:> Close enough to perl, I hope...> > I'm trying to string the filename from the path:> > /dir/subdir/file.ext => file.ext> > with> > /\w+\.\w+$/> > and am
on the other hand:
-8<-
my $bla = "/dir/subdir/file.ext";
$bla =~ /(\w+\.\w+)$/;
print $1 . "\n"; # file.ext
-8<-
works perfectly
Mark Galbreath wrote:
> Close enough to perl, I hope...
>
> I'm trying to string the filename from
man File::Spec ;-)
Mark Galbreath wrote:
> Close enough to perl, I hope...
>
> I'm trying to string the filename from the path:
>
>/dir/subdir/file.ext => file.ext
>
> with
>
> /\w+\.\w+$/
>
> and am getting the entire path returned. I am falling asleep reading
> the perldoc regex
Close enough to perl, I hope...
I'm trying to string the filename from the path:
/dir/subdir/file.ext => file.ext
with
/\w+\.\w+$/
and am getting the entire path returned. I am falling asleep reading the perldoc regex "intro," "tutorial," full doc, and even Jeffrey Friedl's "Maste
13 matches
Mail list logo