The camel book says I'm effectively experiencing
$value =~ tr/\n\t\f/ /;
continuing with: The remaining whitespace character, \r, forces the printing of a new line if the picture line allows it.
Fine, how do I put this to work?
my $last_line_label = 'IMPRESSION/PLAN: '; my $line = 'I discussed otitis media with her but since her ears are +normal today, we do not need to do anything with them. _____________________________ Marcus Welby, M.D. MW/bnj'; format FLDFMT = @<<<<<<<<<<<<<<<<^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $last_line_label, $line ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $line . $~ = 'FLDFMT'; # # Version A $line =~ s/\n/' ' x 50/ge; # Version B #$line =~ tr/\n/\r/; # Version C #mystery_command; # Version D write; __DATA__ Version A: IMPRESSION/PLAN: I discussed otitis media with her but since her ears are normal today, we do not need to do anything with them. _____________________________ Marcus Welby, M.D. MW/bnj Version B: IMPRESSION/PLAN: I discussed otitis media with her but since her ears are normal today, we do not need to do anything with them. _____________________________ Marcus Welby, M.D. MW/bnj Version C: IMPRESSION/PLAN: I discussed otitis media with her but since her ears are normal today, we do not need to do anything with them. _____________________________ Marcus Welby, M.D. Version D: IMPRESSION/PLAN: I discussed otitis media with her but since her ears are normal today, we do not need to do anything with them. _____________________________ Marcus Welby, M.D. MW/bnj
In reply to Using '/r' with '~~ $var' in format by ff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |