the perl one liner would be
<this>
#add jar files. I am sure there is a perl one liner to do this.
my $jarpattern="$HOME/lib/*.jar";
my @jarfiles =glob($jarpattern);
print "[EMAIL PROTECTED]" if ($debug);
my $jar;
foreach $jar (@jarfiles )
{
$localpath.="$s$jar";
}
<becomes>
$localpath .= "$s" . join( "$s", glob( $jarpattern ) );
but for readabiliy you probably want...
my $jarpattern = "$HOME/lib/*.jar";
my @jarfiles = glob( $jarpattern );
$localpath .= "$s" . join( "$s", glob( @jarfiles ) );
p.s.
you should make you env safe...run with a -T -w tags eg
/usr/bin/perl -T -w
admittedly you get heaps more warning messages but it stops you making simples
mistakes
you might overlook.
Although you will have to resolve the insecure dependency using the glob.
If you like I will submit a safer version later but have to work now :)
Michael
also to make it portable use /usr/bin/perl not /usr/local/perl most
installations will have it here.
--- BEGIN GEEK CODE BLOCK ---
Version 3.12
GCS d+(-) s:- a-- C++(+++)$ UL++++(H)(S)$ P+++$ L+++$>++++
E--- W++ N++ o++ K? !w() O? !M V? PS+ PE+++ Y+ t+ 5++ X++
R(+) !tv b++(++++) D++ G>++ e++> h--()(*) r+ y+()
--- END GEEK CODE BLOCK ---