I have a program in perl that is passed a string from the console. If I pass the string \r\n from the console, it does as it is supposed to and literally stores \r\n into the console arguments as it was created like so:
my $str = '\r\n';
How can I make $str into a CRLF? For example; how can I make
my $str = '\r\n';
into
my $str = "\r\n"; #<--- perl converts \r\n into a carriage return & line feed.
How can I force perl to convert the string passed from the console into CRLF?
If I am not being clear enough, let me show an example:
my ($arg1, $arg2) = @ARGV;
print $arg1 . $arg2;
Assuming $arg1 was passed 'Hello\r\n' and $arg2 was passed 'World!' it will print Hello\r\nWorld! when I want it to print Hello(newline)World!