matth has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; my $input = "transfer_to_linux.txt"; open (INPUT, "<$input"); while (my $line = <INPUT>){ print "here\n"; if ($line =~ /^%(.{1,100})$/){ print "EEEEEEEEEEEEEEEEEEEEEEEEEEEE\n"; my $name = $&; } my $outfile = "outfile[$name].txt"; open (OUTFILE, "+>>$outfile"); if ($line =~ /^(\d{1,6})\t(\d{3})$/){ my $count = $1; print "COUNT: $count"; my $SPSS_figures = $2; print "SPSS_figures : $SPSS_figures"; my @split = split (//, $SPSS_figures); for (my $x = 0 ; $x <= $count; $x++){ print OUTFILE "$split[1]\t$split[2]\t$split[3]\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: requires explicit package name
by dws (Chancellor) on Dec 01, 2002 at 18:43 UTC | |
|
Re: requires explicit package name
by Enlil (Parson) on Dec 01, 2002 at 18:49 UTC | |
|
Re: requires explicit package name
by converter (Priest) on Dec 01, 2002 at 20:54 UTC | |
by matth (Monk) on Dec 02, 2002 at 14:46 UTC |