$stmt =~ m/^FROM\s+(\S+)$/mgs; #### use strict; use warnings; my $sql = q{ SELECT id FROM table WHERE name like 'A%' }; my ($table) = $sql =~ m/^FROM\s+(\S+)$/mgs; print "$table\n"; #### table
## use strict; use warnings; my $sql = q{ SELECT id FROM table WHERE name like 'A%' }; my ($table) = $sql =~ m/^FROM\s+(\S+)$/mgs; print "$table\n"; ##
## table