in reply to Origin of 'md5sum' and 'sh' logs
shouldn't compile. In general a "my" variable cannot be declared within a conditional statement.if (-e $filepath) { my $exception... } else { my $exception... }
$exception is reference to a hash:
#!/usr/bin/perl use strict; use warnings; my $exception = {table => 'tablename', exception => 'outofdate'}; my $exception2 = {table => 'tablename2', exception => 'allOk'}; foreach my $error ($exception, $exception2 ) { print "$error->{exception}\n"; } __END__ outofdate allOk
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Origin of 'md5sum' and 'sh' logs
by morgon (Priest) on Feb 26, 2019 at 01:22 UTC | |
by Marshall (Canon) on Feb 26, 2019 at 01:43 UTC | |
by morgon (Priest) on Feb 26, 2019 at 02:44 UTC |