Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

RE: Disable animated GIFs and blinking text in Netscape

by japhy (Canon)
on Sep 20, 2000 at 22:46 UTC ( #33373=note: print w/replies, xml ) Need Help??

in reply to Disable animated GIFs and blinking text in Netscape

Several suggestions:
  • The -s switch to Perl allows you to use simple options at the command-line:
    % perl -s -e 'print $A, $B' -- -A -B=hello 1hello
  • Don't call perl from perl unless you have a good reason to. If you want to emulate Perl's in-place editing, then do so.
Here's my offering:
#!/usr/bin/perl -spi use strict; use vars qw( $gif $blink ); my $files; BEGIN { unless ((defined $gif or defined $blink) and @ARGV) { (my $exec = $0) =~ s!.*/!!; exit warn "usage: $exec [ -gif=[1|0] ] [ -blink=[1|0] ] files...\n +"; } $files = "@ARGV"; } if (defined $gif) { if ($gif) { s/ANIMEXTZ1\.0/ANIMEXTS1.0/, s/NOTSCAPE2\.0/NETSCAPE2.0/ + } else { s/ANIMEXTS1\.0/ANIMEXTZ1.0/, s/NETSCAPE2\.0/NOTSCAPE2.0/ } } if (defined $blink) { if ($blink) { s/blynk/blink/ } else { s/blink/blynk/ } } END { printf "Animated GIFs are %sabled in $files\n", ("dis","en")[$gif] if defined $gif; printf "Blinking text is %sabled in $files\n", ("dis","en")[$blink] if defined $blink; }
I'll comment on (or explain) the code as requested.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://33373]
[LanX]: with different specialized employees in different rooms
[LanX]: communication overhead calls for sensible management
[ambrus]: "different specialized employees in different rooms" => so, there's a cleaner guy who cleans up the vomit from the bathroom every morning?
[erix]: makes me think of MMM too (mythical man month): "adding more people to a project makes it slower"
[erix]: that should be "to an already-too-late- project" I think
[ambrus]: oh yes, we have a pretty good example of that when they reorganized the grill place in the restaurant nearby.
[ambrus]: it now has two more people working there, and they're serving slower and more expensive.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2017-09-22 13:47 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (264 votes). Check out past polls.