doc1623 has asked for the wisdom of the Perl Monks concerning the following question:
sub getsql{ my $dbh = shift; my $script = shift; my $insert= shift; local $/ = undef; open FILE, '<', $script, or die "Couldn't open SQL file"; my $insql = dwindex(<FILE>); my $outsql; if (length $insert) { $outsql = getinserts($insql,$insert); } else { print "in else:$insql\n"; if ($insql =~ m/.*~\w+~.*/) {print "MATCHED IT\n";} errmsg(1) && die if ($insql =~ m/.*~\w+~.*/); print "pased*********************\n"; $outsql = $insql; } close FILE; return $outsql; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: no exit! (return)
by tye (Sage) on Aug 14, 2015 at 16:58 UTC | |
by doc1623 (Novice) on Aug 14, 2015 at 18:56 UTC | |
by doc1623 (Novice) on Aug 14, 2015 at 17:45 UTC | |
by Corion (Patriarch) on Aug 14, 2015 at 17:53 UTC | |
by stevieb (Canon) on Aug 14, 2015 at 18:08 UTC | |
|
Re: no exit!
by Laurent_R (Canon) on Aug 14, 2015 at 18:56 UTC |