Hi, just try this,
$query1 = "select foo,bar,baz,"; $query1 =~ s#(.*),$#$1#gs; print "$query1"; #output #select foo,bar,baz
In reply to Re: How to take the last character out of a string
by perlsen
in thread How to take the last character out of a string
by Deib
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |