Using the -n option. : Perl Command « Language Basics « Perl
- Perl
- Language Basics
- Perl Command
Using the -n option.
#!/usr/local/bin/perl -n
# input line is stored in the system variable $_
$line = $_;
chop ($line);
printf ("* %-52s *\n", $line);
Related examples in the same category