> "PK" == Parag Kalra writes:
PK> print "$field\n"
what would that supposedly do to help with the question?
and please bottom post. this is a good example. your one line of code
should be BELOW the code it replaces or purports to fix.
thanx,
uri
--
Uri Guttman -- u...@stemsyst
On 2/3/11 Thu Feb 3, 2011 5:05 AM, "Téssio Fechine"
scribbled:
> The program:
> --
> #use strict;
> use warnings;
>
> my $field = shift @ARGV;
> my $regex = '(\w+)\s*' x $field;
>
> while () {
> if (/$regex/) {
> print "$$field\n"; # refers to a match variable
> }
> }
> --
>
> Example Usage:
print "$field\n"
~Parag
2011/2/3 Téssio Fechine
> The program:
> --
> #use strict;
> use warnings;
>
> my $field = shift @ARGV;
> my $regex = '(\w+)\s*' x $field;
>
> while () {
>if (/$regex/) {
>print "$$field\n"; # refers to a match variable
>}
> }
> --
> "TF" == Téssio Fechine writes:
TF> The program:
TF> --
TF> #use strict;
TF> use warnings;
TF> my $field = shift @ARGV;
TF> my $regex = '(\w+)\s*' x $field;
TF> while () {
TF> if (/$regex/) {
TF> print "$$field\n"; # refers to a match variable
TF> }
On 11-02-03 08:05 AM, Téssio Fechine wrote:
The program:
--
#use strict;
use warnings;
my $field = shift @ARGV;
my $regex = '(\w+)\s*' x $field;
while () {
if (/$regex/) {
print "$$field\n";# refers to a match variable
}
}
--
Example Usage:
--
$ echo 'Strang