I am writing a script on my personal machine which is connected to the remote server. I think the remote server has Perl 4.0 or lesser version installed and that is why it is unable to recognize the same. Is there an alternative to the chomp command?
I am writing a script on my personal machine which is connected to the
Share
It’s not an exact replacement, but you could try:
which will strip either CRLF (DOS), LF (Unix), CR (Mac?).
The normal chomp operator always strips out the currently defined
$INPUT_RECORD_SEPARATORfor the current O/S.