http://qs321.pair.com?node_id=779836


in reply to Re^2: reduce line of code
in thread reduce line of code

I guess this is what Sun751 meant. His non-working example scopes the $cmd variable to the if ... else blocks.

Replies are listed 'Best First'.
Re^4: reduce line of code
by jeanluca (Deacon) on Jul 14, 2009 at 09:26 UTC
    OT: just add
    use strict ; use warnings ;
    to your programs, witch would have detected your scoping problem!

    LuCa