Hi Matt,
Note that your while() condition needs !~ instead of =~ (and I don't think
the ',' is necessary in the '-{3,}' regex).
Otherwise, the code worked for me except when I passed it an empty file.
Try testing the value of $oneline before you enter the while loop.
-- Brad
> I am opening a file witht he following command:
>
> open (LOGFILE, "100.txt");
>
> then wanting to manipulate this line by line.. I know I want to stop
> manipulating when I reach a line in the file with a series of dashes, such
> as:
>
> ------------------------------------------
>
> Right now I am doing:
>
> $oneline = <LOGFILE>;
> while ( $oneline =~ /(-{3,})/ )
> {
> # process one line
> $oneline = <LOGFILE>;
> }
>
> ------------------------------------------
>
> Which is not working... I get an error of use of uninitialized value at
line
> 28, which is the while line above.... I am confused.. $oneline is
> initalized. I call open in the main function, and then enter this
function,
> but I assume that the file handle is still valid and active, is that a
> falllacy?
>
> Thanks for any and all help!
>
> Matt
>
> -=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=
> Matt Fuerst
> Developer, Telecorp Products, Inc.
> A Mettoni Group plc. Company
> 248,960,6632
> [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]