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

barjaph

by mkmcconn (Chaplain)
on Feb 10, 2001 at 22:05 UTC ( [id://57637]=CUFP: print w/replies, xml ) Need Help??

A progress bar in the form of a JAPH.
Not tested on Windows.
Reminder: ;-)

print "TRUE" if "JAPH" ne "OBFUSCATION";

#!/usr/bin/perl -w use strict; $|++; spell() or print "\n"; sub spaz{ # you can increase the repetitions to slow this down # or add something useful in the loop for (1..600) { print "$_\x08" for ("|","/","-","\\","_"); } } sub spell { print and spaz for split // , qq._just another perl hacker.; } __END__

# cutesified, for a signature. sub spaz{for(1..600){print"$_\x08"for("|","/", "-","\\","_");}}for (qq.just another perl hacker!.){ for(split //){print if s i ! i \n ix or print and spaz ;} } __END__

#!/usr/bin/perl -wT # Same idea, but cleaned up of the # JAPH silliness. # Now it will measure progress (spaz() is # wasteful for real work. This will give # you an idea, though.) "./*" is used :. -T is too. use strict; work(); sub spaz{ for (1..600) { print "$_\x08" for ("|","/","-","\\"); } } sub work { for (glob "./*"){ open FILE, $_ or die "$_: $!"; print "|"; # do something... close FILE; spaz; } print " Done!\n"; } __END__

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://57637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-26 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found