#!/usr/bin/perl use Net::FTP; use IO::Uncompress::Gunzip qw(gunzip $GunzipError); use Date::Simple qw(d8); use DBI; use DBIx::Dump; use Time::Piece; use Time::Seconds 'ONE_DAY'; if (open(my $fh,'< CASH_REPORT-cfpd0903.txt')){ #or die "Could not open file $!"; while (my $row1 = <$fh>) { if ($row1=~/^.*\b(CSH DEP)\b.*$/) { $row1=~s/^\s+//; my $row2 = $row1; #print "$row1 sachin is here \n"; my @sachin = split/\s+/,$row2; print "@sachin printing array\n"; } }