sgmansell has asked for the wisdom of the Perl Monks concerning the following question:
The variables are listed on three lines but the regular expresions are all listed on one long line. I then run a loop to read each line and print several of the variables just to see how it's workiing. It works as desired for several lines then a couple of lines will produce the following error:($beginning,$agency,$district,$ssn,$serv_per_m,$serv_per_y,$serv_per_t +,$last_name,$first_name_i, $middle_name_i,$cover_group, $pay_code, $pay_rate, $earnings, $holder, + $ret_percent,$surv_ben, $work_sch_code,$cont_amt,$cont_code,$stuff) = /(\d)(\d{4})(\d{3})(\d{9})(\d{2})(\d{2})(\d)(\D{10})(\D)(\D)(\d{5})(\d +{2})(\d{8})(\d{6}\D)(\s{8})(\d{4})(\d{3})(\d{3})(\d{5}\D)(\d{2})(.*\s +)$/;
Then it will print several lines correctly and then some more of the error messages.Use of uninitialized value $last_name in concatenation (.) or string a +t final_check.pl line 47, <> line 14
I am currently running PERL 5.10.0 built for MSWin32-x86-multi-thread (with 3 registered patches)
Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: string error message
by jwkrahn (Abbot) on Jun 15, 2009 at 23:04 UTC | |
|
Re: string error message
by markkawika (Monk) on Jun 16, 2009 at 00:52 UTC | |
by Marshall (Canon) on Jun 16, 2009 at 04:25 UTC | |
by ysth (Canon) on Jun 16, 2009 at 05:59 UTC | |
by Marshall (Canon) on Jun 16, 2009 at 06:20 UTC | |
|
Re: string error message
by graff (Chancellor) on Jun 16, 2009 at 02:50 UTC |