my @whatever01=system('ssh somehost "grep $commonnumber File2-2"'); #### #!/usr/bin/perl -w use strict; open(File1, "File1"); while () { if (/@ARGV/) { my @atlmmg01=split(/:/); my $commonnumber=@atlmmg01[17]; print "--------------------------------------------------------- ----\n"; print "@atlmmg01[2]\n"; print "@atlmmg01[17,18]\n"; print "@atlmmg01[26]\n"; } }