Hello,
I have never used Perl although I'm trying to modify some code.
From a unix system, a line of text might end with \f\n.
Is it possible to convert \f to \n so that the line would end with \n\n?
I have found the following although it doesn't appear to work.
I could also remove the \n and then \f
Do this, I would like to add a \n although I'm not sure how.
I've tried a few things, such as
I don't know if I'm even using proper syntax or not.
Any help would be appreciated.
Thanks.
If at first you don't succeed, then sky diving wasn't meant for you!
I have never used Perl although I'm trying to modify some code.
From a unix system, a line of text might end with \f\n.
Is it possible to convert \f to \n so that the line would end with \n\n?
I have found the following although it doesn't appear to work.
Code:
$temp=~s/\f/\n/g;
I could also remove the \n and then \f
Code:
if ($temp=~/\n/) {
chop($temp);
}
if ($temp=~/\f/) {
chop($temp);
}
I've tried a few things, such as
Code:
$temp=$temp."\n";
I don't know if I'm even using proper syntax or not.
Any help would be appreciated.
Thanks.
If at first you don't succeed, then sky diving wasn't meant for you!