SyntaxFix
Write A Post
Hire A Developer
Questions
Just use /\s+/ against '' as a splitter. In this case all "extra" blanks were removed. Usually this particular behaviour is required. So, in you case it will be:
my $line = "file1.gz file1.gz file3.gz"; my @abc = split(/\s+/, $line);