Paav has asked for the wisdom of the Perl Monks concerning the following question:
..... I'm trying to read a line with the word "$name", there. and then i need to parse the last two elements from the line, made up of five rows, including the word name. Can some one let let me know why am I getting the error? and how would I go above solving the problem? Thanks Paav!/usr/local/bin/perl print "Input file name: "; chomp ($infilename = <STDIN>); use strict; while ( defined($currentLine = <STDIN>) ) { if ($currentLine =~ /^ $name:/) { print $currentLine; } } close(IN) close(OUT)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: required explicit package error.
by btrott (Parson) on Jun 14, 2000 at 22:20 UTC | |
by Paav (Novice) on Jun 14, 2000 at 23:58 UTC | |
by verbal (Initiate) on Jun 15, 2000 at 08:08 UTC | |
by Anonymous Monk on Jun 15, 2000 at 21:16 UTC | |
by Paav (Novice) on Jun 15, 2000 at 21:20 UTC | |
by nuance (Hermit) on Jun 15, 2000 at 23:43 UTC | |
by Paav (Novice) on Jun 15, 2000 at 21:29 UTC | |
by btrott (Parson) on Jun 15, 2000 at 00:56 UTC | |
|
Re: required explicit package error.
by jjhorner (Hermit) on Jun 14, 2000 at 22:35 UTC | |
|
RE: required explicit package error.
by Ovid (Cardinal) on Jun 14, 2000 at 23:20 UTC |