Timothy, et al --
...and then Timothy Johnson said...
%
% David->"Hmmm... OK, so that explains it, but I still don't get it... So
% the match is going to spit out a scalar but in order to use it you have to
% capture it in a list context?"
%
% No, actually the opposite. The match returns a l
ject: Re: shifting solved (was "Re: chomp-ing DOS lines, shifting, and a
variable variable")
Timothy, et al --
and then Timothy Johnson said...
%
% Ok, I finally got a chance to test it, and the problem with my code is
that
% split expects a scalar as the second argument. T
Timothy, et al --
...and then Timothy Johnson said...
%
% Ok, I finally got a chance to test it, and the problem with my code is that
% split expects a scalar as the second argument. This does work:
%
% ($temp) = $fullpath =~ m:/mp3/(.+):;
% @working = split /\//,$temp;
%
% because it is
Try this:
@working = split(/\//,($fullpath =~ m:/mp3/(.+):)[0]);
-Original Message-
From: David T-G [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 09, 2002 1:43 PM
To: perl beginners
Cc: Timothy Johnson
Subject: Re: shifting solved (was "Re: chomp-ing DOS lines, shifting,
and a variabl
Timothy, et al --
...and then David T-G said...
%
% ...and then Timothy Johnson said...
% %
% % I can't test this where I am right now, but would something like this work?
% %
% % @working = split /\//,($fullpath =~ m|/mp3/(.+)|); #changed match delimiter
%
% I'm surprised to find that it doe
Timothy, et al --
...and then Timothy Johnson said...
%
% I can't test this where I am right now, but would something like this work?
%
% @working = split /\//,($fullpath =~ m|/mp3/(.+)|); #changed match delimiter
I'm surprised to find that it does, but I'm glad I tested it. I thought
that ma
Elias Assmann
Subject: Re: shifting solved (was "Re: chomp-ing DOS lines, shifting,
and a variable variable")
Elias, et al --
and then Elias Assmann said...
%
% Oh my, what a bad day for my poor little brain... Sorry for all that
% confusion.
*grin* No problem; it made me c
Elias, et al --
...and then Elias Assmann said...
%
% Oh my, what a bad day for my poor little brain... Sorry for all that
% confusion.
*grin* No problem; it made me check my answers :-)
%
% On Sun, 9 Jun 2002, David T-G wrote:
%
% > ...and then Elias Assmann said...
% >
% > % be two lines
Elias, et al --
...and then Elias Assmann said...
%
% On Sat, 8 Jun 2002, David T-G wrote:
%
% > % I can't modify $fullpath because I'll use it later, but for parsing I
% > % don't need the leading "/mp3/" part, and the only way I've found to get
...
% > While it may not be a perfect solution,
Elias --
...and then Elias Assmann said...
%
% On Sun, 9 Jun 2002, Elias Assmann wrote:
%
% > be two lines, so how about this: @working = m'/mp3(/[^/]+)+';?
%
% So much for posting code without trying it... This isn't working, but
*grin*
% it isn't obvious to me why, and I don't have time r
drieux, et al --
...and then drieux said...
%
% On Saturday, June 8, 2002, at 08:13 , David T-G wrote:
% >drieux, et al --
% >...and then drieux said...
% >% On Saturday, June 8, 2002, at 04:47 , David T-G wrote:
...
% >
% >Tell me about the standard... Should perl happily chomp either a UNIX o
On Saturday, June 8, 2002, at 08:13 , David T-G wrote:
> drieux, et al --
> ...and then drieux said...
> % On Saturday, June 8, 2002, at 04:47 , David T-G wrote:
[..]
> % >...
> % >chop ; chop ; # strip \n\r (no chomp here)
> ...
> %
> % that is way too weird - si
Hi, all --
...and then David T-G said...
%
...
% I can't modify $fullpath because I'll use it later, but for parsing I
% don't need the leading "/mp3/" part, and the only way I've found to get
% rid of it elegantly is
%
% ...
% @working = split(/\//,$fullpath) ;# cut path
drieux, et al --
...and then drieux said...
%
% On Saturday, June 8, 2002, at 04:47 , David T-G wrote:
% [..]
% >
...
% >...
% >chop ; chop ;# strip \n\r (no chomp here)
...
%
% that is way too weird - since that means that what
% ever dos app you were using
On Saturday, June 8, 2002, at 04:47 , David T-G wrote:
[..]
>
> The files were written in DOS format (\r\n or, I am more inclined to
> think, \n\r) and chomp doesn't work; instead I have to
>
> ...
> while (<>)
> {
> ...
> chop ; chop ; # strip \n\r (no c
Hi, all --
[I should probably note early on that I do have some preferences that
don't match what many coders do but which I will very probably continue
anyway, like how I place braces, but that I quite welcome perl style
tips along with the rest of the answers begged below because lots of
the ot
16 matches
Mail list logo