Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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;

Prints:

No good

Perl is environmentally friendly - it saves trees

Replies are listed 'Best First'.
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 test.pl #!/usr/bin/perl my $text = "No \x08\x08\x08 good"; 1 while $text =~ s/.\x08//; print "$text\n"; [james@adajio ~]$ ./test.pl good [james@adajio ~]$

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://684507]
help
Chatterbox?
1nickt is not sure more and more layers separating the programmer from the program is the right way to go...
[holli]: happy one, shmem ;)
[1nickt]: I had an interview couople of weeks ago, heard from a principal engineer that a friend of his who works at The Google told him that the self-teaching software that determines the dynamic pricing for their adverts...
[1nickt]: ... has become so complex that there is no one at the Goole who knows what it does.
[marto]: William Gibson was right
[moritz]: a classical problem with machine learning
[1nickt]: moritz isn;t the difference today that the machine learning algos are in charge of most stuffs?
[moritz]: depends on what you mean by "most stuff"
[1nickt]: I am sure I don't know about most of the stuff that is no longer controlled by humans. I do know that it's past the point of determining consumer pricing and into things that can kill me with blunt force!

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-11-21 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (301 votes). Check out past polls.

    Notices?