I'd never write that in a program. I'm too lazy. Plus, there's too many ways this could go wrong when a maintainer comes long. I'd write this as:@Default_Tools_List = ( [ 'gzip' ,'app', '' , 'generic_check' ], [ 'gunzip' ,'app', '' , 'generic_check' ], [ 'tar', ,'app', '' , 'generic_check' ], [ 'tr', ,'app', '' , 'generic_check' ], [ 'date' ,'app', '' , 'generic_check' ], [ 'ps', ,'app', '' , 'generic_check' ], [ 'cat', ,'app', '' , 'generic_check' ], [ 'id', ,'app', '' , 'generic_check' ], [ 'echo' ,'app', '' , 'generic_check' ], [ 'pwd', ,'app', '' , 'generic_check' ], [ 'chmod' ,'app', '' , 'generic_check' ], [ 'ln', ,'app', '' , 'generic_check' ], [ 'cp', ,'app', '' , 'generic_check' ], [ 'rpm', ,'app', '' , 'generic_check' ], [ 'clear' ,'app', '' , 'generic_check' ], [ 'dirname' ,'app', '' , 'generic_check' ], [ 'df' ,'app', '' , 'generic_check' ], [ 'Carp' ,'perlm', 'Perl Module - Carp', 'perl_module_check' + ], ) ;
If you're "cutting and pasting" with an editor while writing a program, you're almost always going to give the maintainer a headache. Please don't.@Default_Tools_List = ( (map [$_, 'app', '', 'generic_check'], qw( gzip gunzup tar tr date ps cat id echo pwd chmod ln cp rpm clear + dirname df )), [ 'Carp' ,'perlm', 'Perl Module - Carp', 'perl_module_check' + ], ) ;
In reply to Data helper (was Re: ensure - Ensure that the environment is good.)
by merlyn
in thread ensure - Ensure that the environment is good.
by muralikrishnan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |