in reply to Help in using arrays
The code seems very similar to your code in Searching and printing through a array - did my reply not work for you?
If you can tell me where my reply does not work for you I can maybe help you to adapt my code to your problem. It would also help to have a complete, self-contained program which initializes @all and reads the data from a __DATA__ section so we can run the code and reproduce the problem without any further setup on our part. Something like this:
#!/usr/bin/perl -w use strict; my @all = ("7723","7725","9908","7765","7874"); while (<DATA>) { # ... your code to check the current line }: __DATA__ 77876 8543 CA84985 54E 77873 8003 CA84985 54E 77875 7725 CA84985 54E ...
|
|---|