RE: grab first item in every file

2006-08-22 Thread Brian Volk
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Monday, August 21, 2006 5:49 PM To: Perl Beginners Subject: Re: grab first item in every file Brian Volk wrote: Hi All~ Hello, How can I grab the first item in every file and include in the first

Re: grab first item in every file

2006-08-22 Thread John W. Krahn
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

RE: grab first item in every file

2006-08-22 Thread Brian Volk
-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

grab first item in every file

2006-08-21 Thread Brian Volk
Hi All~ How can I grab the first item in every file and include in the first print statement below. The first item will always start w/ a $ and will not match a key in %DIR_LIST. The other items in the file (.pdf's) may or may not match a key in %DIR_LIST Filename1: O20270.TXT $432

Re: grab first item in every file

2006-08-21 Thread John W. Krahn
Brian Volk wrote: Hi All~ Hello, How can I grab the first item in every file and include in the first print statement below. The first item will always start w/ a $ and will not match a key in %DIR_LIST. The other items in the file (.pdf's) may or may not match a key in %DIR_LIST It looks