#!/usr/bin/perl -w use strict; my $quotes = "/home/gtheys/quotes"; open(FILE,"<$quotes") || die "Can't open quotes file: $!"; while (<FILE>) { chomp; my ($quote,$person) = split /--/; $quote =~ s/^\s+|\s+$//g if defined $quote; $person =~ s/^\s+|\s+$//g if defined $person; if (defined $quote) {print "$quote\t"}; if (defined $person) { print "$person";} print "\n"; } close FILE || die "Can't close quotes file: $!";
In reply to Re: Re: use strict and -w
by toadi
in thread use strict and -w
by toadi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |