in reply to Re^3: How to remove underscore at the end of the line?
in thread How to remove underscore at the end of the line?
#!/usr/local/bin/perl use strict; use warnings; my $str = 'DCMS_DEMO_new_block2_checklist_tmp_rev1_'; chop $str; print "$str\n"; my $regstr = 'DCMS_DEMO_new_block2_checklist_tmp_rev1_'; $regstr =~ s/_$//; print $regstr;
|
|---|