in reply to Request to sort out a problem in perl program for getting result as print "@a or $a" of a map function code

The following is a working example. Have fun !!

-Kiel R Stirling.
#!/usr/bin/perl -w use strict; use IO::File; my $string = "1 2 3 4 5 6 7 8"; my $fh = IO::File->new(">/tmp/output.txt"); die "Failed to open output file $!" unless defined $fh; say $fh $_ for split /\s/, $string; $fh->close;
  • Comment on Re: Request to sort out a problem in perl program for getting result as print "@a or $a" of a map function code
  • Download Code