Here document in a loop : Here Document « String « Perl
- Perl
- String
- Here Document
Here document in a loop
#!/usr/bin/perl
use warnings;
use strict;
foreach (split "\n", <<LINES) {
Line 1
Line 2
Line 3
LINES;
print "Got: $_ \n";
}
Related examples in the same category