in reply to How do I use command line arguments?

Well your code would not pass strictness as it looks now, but we'll ignore that for the moment. Do you want to print out the whole line that matches, or just the right hand side? The code below only prints the right hand side.

open(IN, $ARGV[1]) or die "Can't open groupinfo: $!"; while (<IN>) { chomp; my ($name, $desc) = split /:/, $_, 2; next unless $name eq $ARGV[0]; print $desc; } close(IN);

You had the right idea, but you had your print in the wrong place, and there really isn't any need for the %groupinfo hash if you just need to print the results.

The @ARGV array holds the arguments passed to the perl script.