aseidas has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; open FH, '/tmp/configfile' or die "Could not open file: $!\n"; my $foo=<FH>; close FH; my @foo=split(//, $foo); my $foo1=join("",@foo[0..2]); my $foo2=join("",@foo[3..5]); my $foo3=join("",@foo[6..16]); my $foo4=join("",@foo[17..19]); my $foo5=join("",@foo[20..24]); foo1(*$); foo2(*$); foo3(*$); foo4(*$); foo5(*$); sub foo1{ print "$foo1\n"; } sub foo2{ print "$foo2\n"; } sub foo3{ print "$foo3\n"; } sub foo4{ print "$foo4\n"; } sub foo5{ print "$foo5\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Appropriate use of typeglob
by vladb (Vicar) on Jul 11, 2002 at 02:58 UTC | |
by aseidas (Beadle) on Jul 11, 2002 at 03:28 UTC | |
Re: Appropriate use of typeglob
by Aristotle (Chancellor) on Jul 11, 2002 at 03:26 UTC | |
Re: Appropriate use of typeglob
by bronto (Priest) on Jul 11, 2002 at 10:21 UTC |