On Monday, June 10, 2002, at 05:21 , William Melanson wrote:
[..]
> I'm just curious if it's
> an eye sore. Maybe I should just give up attempting this whole
> programming stuff and stick to wielding my light sabre at those
> selfless stormtroopers (who come in the hundreds) til the wee
> hours of the morning?

I really hate to arrive late to the party on these things...
{ must have been your jedi mind tricks... }

I think most of the basics have been covered - so I am left
to offer the tricks about how to 'test a code idea' - since
a lot of have to dummy up the output of some command that
exists only in 'strange cases'....

http://www.wetware.com/drieux/pbl/Auslanders/repQuota.txt

So while, yes.... Whacking in say

        my $repCmd = "/tmp/test_repquota"; # in lieu of /usr/sbin/repquota

        my $farCode=<<EOCODE;
        #!/bin/sh
        echo "
        <what the output would look like>
        EOCODE

        unless( -x $repCmd ) {
        open(RF, ">$repCmd") or die "no can make temp code: $!\n";
        print RF $farCode ;
        close(RF);
        chmod 0755 , $repCmd ;
        }

        $repCmd .= " -a";  # where we would put the cmd line args onto it.


into the code may seem 'way sick' to most - it does help one
play with the various variations on a theme that one expects
or FEARS may be the output from such a command that one would
be able to parse...

Then when you have decided which tactic you find helpful,
you can RIP OUT the 'funk' and notice

        my $repCmd = "/usr/sbin/repquota ";
        
        $repCmd .= " -a";  # where we would put the cmd line args onto it.

could be cleaned up one more step.... or not... and
the rest of the perl code will work as initially tested for....


ciao
drieux

http://www.wetware.com/drieux/pbl/

--------------

This space left intentionally blank.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to