Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#action to edit=== if ($action =~ /edit/) { my ($newline, $list); if ($action eq 'edit1') { $newline = join "\n", $job11, $job12, $job13, $job14, $job15; $list = $list1; } elsif ($action eq 'edit2') { $newline = join "\n", $job21, $job22, $job23, $job24, $job25; $newline = $newline . "\n"; $list = $list2; } else { print 'Sorry - did not understand this behaviour, please hit the b +ack button and try again'; exit; } open FH, '>', "$list.tmp" or die "$list == $!"; print FH $newline; close FH; print $newline; exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Not printing to file, but print to screen ok
by toolic (Bishop) on Mar 17, 2010 at 18:36 UTC | |
by almut (Canon) on Mar 17, 2010 at 18:45 UTC | |
|
Re: Not printing to file, but print to screen ok
by Marshall (Canon) on Mar 18, 2010 at 01:02 UTC | |
|
Re: Not printing to file, but print to screen ok
by jonnyfolk (Vicar) on Mar 17, 2010 at 22:29 UTC |