I have a line that looks like this ...
"http://www.example.com/example.pdf "
"http://www.example.com/
example.pdf "
I need to remove spaces and line breaks. How should I do it? My result should be
"http://www.example.com/example.pdf"
Just use the replace statement : s///
s///
$string =~ s/\s+//g;
A class \s matches a space character, a set, [\ \t\r\n\f]and others.
\s
[\ \t\r\n\f]
while (<>) { s/\s+//g; print; }
?