I've got a script that goes through SQL files and returns an array of
table names.  To find table names I use:

while ($_ = <FILE>) {
  if ($_ =~ m/CREATE.*TABLE/) {
    $_ = $';
    while (not ($_ =~ m/)//)) {  # match last parenthesis
       $_ .= <FILE>;
    }
    my $table_name = $`;
    $table_name = tr/ \t\n\r//d;
    return $table_name;
  }
}

My Programming Perl book says not to use $' $` and $&.  Is there a
better way to do this?

Thanks in advance,

Dan

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to