eileen1017
MIS
I need to write a perl script that will read a report two lines at a time.
The report like the following:
SQL>connect aaaaa/aaaaa
Connected.
SQL>connect bbbbb/bbbbb
Connected.
SQL>connect ccccc/ccccc
ERROR
If the second line shows connected then print "aaaaa, Your Password is the same as your username. You need to change you password."
"bbbbb, Your Password is the same as your username. You need to change you password."
If the second line shows error then print "ccccc, Your password has pass the security test."
I know how to use perl script to read a file line by line, but how to read two lines at same time? Does any one know? Please help. Thanks.
The report like the following:
SQL>connect aaaaa/aaaaa
Connected.
SQL>connect bbbbb/bbbbb
Connected.
SQL>connect ccccc/ccccc
ERROR
If the second line shows connected then print "aaaaa, Your Password is the same as your username. You need to change you password."
"bbbbb, Your Password is the same as your username. You need to change you password."
If the second line shows error then print "ccccc, Your password has pass the security test."
I know how to use perl script to read a file line by line, but how to read two lines at same time? Does any one know? Please help. Thanks.