> -----Original Message-----
> From: John W. Krahn [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 22, 2006 1:42 PM
> To: Perl Beginners
> Subject: Re: grab first item in every file
> 
> Brian Volk wrote:
> >
> > my ( $job, $truck );
> > while ( <> ) {
> >     ( $job ) = $ARGV =~ /(\d+)/ if $. == 1;
> >       $truck = $1 if /\A\$(\d+)/;
> >
> > # $job and $truck are working great!!
> >
> > # next unless the next line ends w/ .pdf  Correct?
> >     next unless /\A((.+)\.pdf)\z/;
> 
> Sorry, I forgot about the newline, just change \z to $
> 
>      next unless /\A((.+)\.pdf)$/;
> 
> which will match before the newline.
> 

[Brian Volk] Thank you John! That did the trick! Brian


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to