Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
i cant even get it to compile and have no idea what im doing wrong. e.g so say if groupinfo looks like this:-#!/usr/local/bin/perl %groupinfo open(IN, "groupinfo") or die "Can't open groupinfo: $!"; while (<IN>) { chomp($line); ($name, $desc) = split /:/, $line; if (/$line/){ $groupinfo{$name} = $desc; } } print "%desc";
and you run it:-aaaa:bbbb cccc:dddd
it will print:-[xxx]$ perl groupinfo.pl aaaa groupinfo
Any help would be appreciated, thanks.bbbb
20040421 Edit by BazB: Changed title from 'need help with perl'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I use command line arguments?
by Belgarion (Chaplain) on Apr 20, 2004 at 22:04 UTC | |
|
Re: How do I use command line arguments?
by shemp (Deacon) on Apr 20, 2004 at 22:29 UTC | |
|
Re: How do I use command line arguments?
by BUU (Prior) on Apr 21, 2004 at 04:34 UTC |