#!/usr/bin/perl -- use strict; use warnings; my @hosts; while(<>){ push @hosts, $_; } if( @hosts ){ print "Read hosts @hosts\n"; } else { die "usage: do_something [file]\n"; }
In reply to Re: Nicest way of getting STDIN a beauty contest
by Anonymous Monk
in thread Nicest way of getting STDIN a beauty contest
by mickep76
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |