Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: Wanted: humanly readable `script` output

by GrandFather (Sage)
on May 05, 2008 at 01:43 UTC ( #684507=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Wanted: humanly readable `script` output
in thread Wanted: humanly readable `script` output

Not really. Consider:

my $text = "No \x08\x08\x08 good"; $text =~ s/.\x08//g; print $text;


No good

Perl is environmentally friendly - it saves trees

Comment on Re^3: Wanted: humanly readable `script` output
Select or Download Code
Re^4: Wanted: humanly readable `script` output
by Anonymous Monk on May 05, 2008 at 02:02 UTC

    This problem with the way /g works is fixed with the 1 while hack

    [james@adajio ~]$ cat #!/usr/bin/perl my $text = "No \x08\x08\x08 good"; 1 while $text =~ s/.\x08//; print "$text\n"; [james@adajio ~]$ ./ good [james@adajio ~]$

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://684507]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2015-07-07 06:30 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (87 votes), past polls