Perl Trim Whitespace And Newline

[Solved] Perl Trim Whitespace And Newline | Perl - Code Explorer | yomemimo.com
Question : perl trim whitespace and newline

Answered by : steamboatid

$str =~ s/^\s+|\s+$//g;

Source : https://stackoverflow.com/questions/31262739/difference-between-chomp-and-trim-in-perl | Last Update : Sun, 12 Sep 21

Answers related to perl trim whitespace and newline

Code Explorer Popular Question For Perl