- or download this
$data = <<'DATA';
foo 1.1.1.1 foo
...
print "While works and gives:\n";
print "$_\n" for @ips;
- or download this
$data = <<'DATA';
foo 1.1.1.1 foo
bar 22.22.22.22 bar
...
print "Foreach now gives:\n";
print "$_\n" for @ips;
- or download this
open FILE, "<path/to/file" or die "Oops, Perl says: $!";
{
...
$data = <FILE>;
}
close FILE;