# HG changeset patch # User Matthias Förste foerste@schlittermann.de # Date 1320239990 -3600 # Node ID 4fd1c0261e370674874cc07350dd9d46a79c96dd # Parent 5f2dde2b27d13ce921b9ef4c9e2b774c31fd67e7 print newlines at line endings instead of beginnings diff -r 5f2dde2b27d1 -r 4fd1c0261e37 isearch --- a/isearch Fri Oct 28 14:45:13 2011 +0200 +++ b/isearch Wed Nov 02 14:19:50 2011 +0100 @@ -56,14 +56,14 @@ if ( -r $imapopts{pass} ) { open P, '<', $imapopts{pass} - or die "\nCan't open '$imapopts{pass}' for reading: $!"; + or die "Can't open '$imapopts{pass}' for reading: $!\n"; $imapopts{pass} =

; chomp $imapopts{pass}; } } else { - print "\nPassword:"; + print "Password:\n"; use Term::ReadKey; @@ -74,17 +74,16 @@ } my $imap = Net::IMAP::Client->new(%imapopts) - or die "\nCould not connect to IMAP server"; + or die "Could not connect to IMAP server\n"; $imap->login - or die "\nLogin failed: " . $imap->last_error; + or die "Login failed: " . $imap->last_error . "\n"; my @f = ( @ARGV or $imap->folders ); -die "\nCan't get folderlist: " . $imap->last_error unless @f; +die "Can't get folderlist: " . $imap->last_error . "\n" unless @f; my $mids; -print "\n"; $| = 1; for (@f) { @@ -93,10 +92,10 @@ print "\nExamining $_ ..."; $imap->examine($_) - or die "\nCan't examine: " . $imap->last_error; - print "\nSearching $_ ..."; + or die "Can't examine: " . $imap->last_error . "\n"; + print "Searching $_ ...\n"; my $m = $imap->search( $opts->{criteria}, undef, $opts->{charset} ) - or die "\nCan't search: " . $imap->last_error; + or die "Can't search: " . $imap->last_error . "\n"; $mids->{$_} = $m; } @@ -108,13 +107,13 @@ if ( @{$m} ) { $imap->examine($_) - or die "\nCan't examine: " . $imap->last_error; + or die "Can't examine: " . $imap->last_error . "\n"; my $s = $imap->get_summaries( $mids->{$_} ) - or die "\nCan't get summaries: " . $imap->last_error; + or die "Can't get summaries: " . $imap->last_error . "\n"; for ( @{$s} ) { - print "\n" . $_->subject; + print $_->subject . "\n"; } @@ -122,7 +121,7 @@ } -print "\nDone\n"; +print "Done\n"; __END__