in reply to If statement multiple conditions

Works for me. Can you show what really is in $cik and @ciks, for example by inserting the following before the if line:
use Data::Dumper; $Data::Dumper::Useqq = 1; warn Dumper $cik, \@ciks;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: If statement multiple conditions
by kbone (Novice) on Mar 14, 2013 at 00:47 UTC

    Thank you for your quick reply! The @ciks array is one I created from a text file. I have printed it at certain points in the program and it seems to work. The $cik variable is one that is generated in the program. Here is the full story: I have a list of identifiers whose SEC filings I want to download. If I do not specifically select those firms, I have to download the entire list from that server, which takes several hours per year. The way this process works is that there is an index file that lists every file available for a given fiscal quarter. In essence, the $cik is the firm identifier from the index file. I only want a certain file type from certain firms...this is what I am trying to match.

    When I use that code you provided when you asked what was in $ciks and @ciks it runs without stopping...seems to repeat over and over again what is in the @ciks array. Thanks again for your help!

Re^2: If statement multiple conditions
by kbone (Novice) on Mar 14, 2013 at 01:19 UTC

    If I use $cik==@ciks[0], I get the single match I am looking for. I am sure this is a minor error that I am just not seeing.

      == is used to compare numbers in Perl. If your data contain strings, you should use eq instead.
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ