Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl open (USERFILE, "/user/test"); for $line (<USERFILE>) { if (index $line, "password" > -1) { $PasswordLine=$line; } if (index $line, "minatt" > -1) { $MinattLine=$line; } if (index $line, "maxatt" > -1) { $MaxattLine=$line; } if (index $line, "exp" > -1) { $ExpLine=$line; } if (index $line, "gold" > -1) { $GoldLine=$line; } } close USERFILE ; sub getpassword { my $start= index $PasswordLine, ":" + 2; result substr $start, length $line; } sub getminatt { my $start=index $MinattLine, ":" + 2; result substr $start, length $line; } sub getmaxatt { my $start= index $MaxattLine, ":" + 2; result substr $start, length $line; } sub getexp { my $start= index $ExpLine, ":" + 2; result substr $start, length $line; } sub getgold { my $start= index $GoldLine, ":" + 2; result substr $start, length $line; } getgold;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with 500 server errors
by mpolo (Chaplain) on Jun 05, 2001 at 16:39 UTC | |
|
Re: Problems with 500 server errors
by Asim (Hermit) on Jun 05, 2001 at 16:50 UTC | |
|
Re: Problems with 500 server errors
by Beatnik (Parson) on Jun 05, 2001 at 21:41 UTC | |
|
Re: Problems with 500 server errors
by Zaxo (Archbishop) on Jun 05, 2001 at 16:46 UTC | |
|
Re: Problems with 500 server errors
by Anonymous Monk on Jun 13, 2001 at 07:30 UTC |