in reply to Printing particular column is not working

Some example files would be nice. What do sample_1_header.csv and sample_1.csv contain? The script as you posted is working for me, sort of -- it's not throwing an error, at least, though it's not outputting anything either.

Based on your code, I'm guessing that sample_1_header.csv contains a list of header fields that you're interested in, one per line. One thing that stands out to me is that you're not chomping these when you read them. Instead of this:

my @header=<FH>;

try this:

chomp(my @header = <FH>);

Making that change makes the script work for me.

That said, here's a few more suggestions.

I also concur with dasgar: don't reinvent the wheel, use a CPAN module to deal with CSV files.