#!/usr/bin/perl use strict; use warnings; if ($surv ne "") { $survmatch = "n"; open (survdat, "+< /xxx ||cmn::dienice("$lang::open_file_write"); flock (survdat,2); @raw_data=; foreach $survinn (@raw_data) { chomp ($survinn); ($survwk,$survn,$survtm)=split(/,/,$survinn); if ((uc($survn) eq uc($poolm)) && ($survwk = $weekin)) { s/$survtm/$surv/i; $survmatch="y"; seek(survdat,0,0); print survdat @raw_data; } } if ($survmatch eq "n") { print survdat "$weekin,$poolm,$surv\r\n"; } } close survdat; exit; __END__ S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail>update1a.pl Unquoted string "survdat" may clash with future reserved word at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Scalar found where operator expected at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9, near ""+< /xxx ||cmn: :dienice("$lang::open_file_write" (Missing operator before $lang::open_file_write?) String found where operator expected at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 19, near "$survmatch="" (Might be a runaway multi-line "" string starting on line 9) (Missing semicolon on previous line?) Possible unintended interpolation of @raw_data in string at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Possible unintended interpolation of @raw_data in string at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Unquoted string "survdat" may clash with future reserved word at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 26. Global symbol "$surv" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 6. Global symbol "$survmatch" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 8. syntax error at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9, near ""+< /xxx ||cmn::dienice("$lang::open_fi le_write" Global symbol "@raw_data" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survinn" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "@raw_data" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survinn" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survwk" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survn" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survtm" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survinn" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survn" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$poolm" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survwk" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$weekin" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survtm" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$surv" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$survmatch" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 9. Global symbol "$weekin" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 26. Global symbol "$poolm" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 26. Global symbol "$surv" requires explicit package name at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 26. syntax error at S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl line 28, near "}" S:\Steve\Dev\PerlMonks\P-2014-04-02@1439-Array-Update-Fail\update1a.pl has too many errors.