ttlgreen has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to find the function(?) that takes some sort of string and prints every character (even things like \n).
I stumbled across it a long time ago but can't remember what it's called.
an example:
If I were to give this function a variable/string such as:
$var = "Some random text.\nMore\nEven More\n";
It would output something like the following to stdout:
S o m e r a n d o m t e x t . \n M o r e \n E v e n M o r e \n
The purpose here is I am collecting some "formatted" output from a program and then trying to make a regex to sift through the data, however I can't make the regex work because of all the "invisible" characters in the formatted output from the program. So I want to dump the data collected in some way like the above example so that I can adjust my regex to consider the invisible characters.
I hope that makes sense :)
Thanks in advance for any help!
|
|---|