Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
#!/usr/bin/perl # # 21 MAY 1999: Created # 29 OCT 1999: Added ability to disable blinking text # Rewrote argument fetch code # Used strict package # 19 SEP 2000: Cleanup use strict; my $execname; # Name of this script my $usage; # Usage information my $ag; # Animated GIF action my $bt; # Blinking text action my $arg; # An argument $execname = $0; $execname =~ s/^.+\///; $usage = " Usage: $execname [-ae|-ad] [-be|-bd] <--> file(s) ... -ae Enable animated GIFs -ad Disable animated GIFs -be Enable blinking text -bd Disable blinking text -- All other arguments are files file(s) Netscape executable(s) Richard Griswold, 21 MAY 1999 "; # Fetch arguments while ( $#ARGV >= 0 ) { $arg = shift ( @ARGV ); if ( ( $arg eq "-ae" ) or ( $arg eq "-ad" ) ) { $ag = $arg; } elsif ( ( $arg eq "-be" ) or ( $arg eq "-bd" ) ) { $bt = $arg; } elsif ( $arg eq "--" ) { last; } # Rest of args are files else { unshift @ARGV, $arg; last; } # Rest of args are files } if ( not $ag and not $bt ) { die "You must specify at least one action\n$usage"; } if ( $#ARGV < 0 ) { die "You must specify at least one file\n$usage"; } # Check access on each file foreach $arg ( @ARGV ) { if ( !( -e $arg) ) { die "File \"$arg\" does not exist.\n$usage"; } if ( !( -f $arg) ) { die "File \"$arg\" is not a plain file.\n$usage"; } if ( !( -w $arg) ) { die "You do not have write access to file \"$arg\".\n$usage"; } } # Perform action $arg = join ' ', @ARGV; if ( $ag eq "-ae" ) { `perl -pi -e 's/ANIMEXTZ1.0/ANIMEXTS1.0/' $arg`; `perl -pi -e 's/NOTSCAPE2.0/NETSCAPE2.0/' $arg`; print "Animated GIFs are enabled in file(s) \"$arg\"\n"; } elsif ( $ag eq "-ad" ) { `perl -pi -e 's/ANIMEXTS1.0/ANIMEXTZ1.0/' $arg`; `perl -pi -e 's/NETSCAPE2.0/NOTSCAPE2.0/' $arg`; print "Animated GIFs are disabled in file(s) \"$arg\"\n"; } if ( $bt eq "-be" ) { `perl -pi -e 's/blynk/blink/' $arg`; print "Blinking text is enabled in file(s) \"$arg\"\n"; } elsif ( $bt eq "-bd" ) { `perl -pi -e 's/blink/blynk/' $arg`; print "Blinking text is disabled in file(s) \"$arg\"\n"; }

In reply to Disable animated GIFs and blinking text in Netscape by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Corion]: ambrus: Oh - that one would be much harder to automate... The SYNOPSIS section should mostly be a runnable program IMO, but I write only small snippets in my documentation for single functions/methods, and creating the appropriate environment for ...
    [Corion]: ... those in an automated fashion seems somewhat hard to me. Although it should do wonders for the test coverage ;)
    [haukex]: Corion: I once wrote an automated thingy for that here
    [haukex]: here's the code that uses it
    [Corion]: haukex: Hmm - maybe I can reuse that. I see that it uses Pod::Parser, which I think was one of the more fragile parsers. But if I'm statically (re)generating the tests instead of doing that "live" on the client/tester machines, that's a much smaller...
    [Corion]: ... problem space than trying to cater to all versions of Pod::Parser(s)
    [haukex]: I think you're right, I think Pod::Simple is the preferred parser now

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (10)
    As of 2017-02-27 12:20 GMT
    Find Nodes?
      Voting Booth?
      Before electricity was invented, what was the Electric Eel called?

      Results (385 votes). Check out past polls.