5 Einträge, 1 Seite |
1 2 3 4 5 6 7
my $string = "Rückantwort"; my @parts = split /\n\n/,$string; for my $part ( @parts ){ next unless $part =~ m!^\s*Volume!; print $part; }
1 2 3 4 5 6 7 8 9 10
my $file = '/path/to/file'; { local $/ = "\n\n"; open my $fh,'<',$file or die $!; while( my $entry = <$fh> ){ next unless $entry =~ m!^\s*Volume!; print $entry; } }
1
2
3
4
5
6
7
8
9
10
11
12
13
open (VOL, "$ssh $filer aggr show_space $aggr |") || die "Cannot connect to $filer: $! \n";
while (<VOL>)
{
chomp (my $r3="$_");
my @parts = split /\n\n/,$r3;
for my $part (@parts)
{
next unless $part =~ m!^\s*Volume!;
print ("Habe: $part\n");
}
#print ("Lese $r3 \n");
} # end while VOL
close (VOL);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
open (VOL, "$ssh $filer aggr show_space $aggr |") || die "Cannot connect to $filer: $! \n"; while (my $line = <VOL>){ if( $line =~ /^\s*Volume/ ){ $bool = 1; } next unless $bool; print $line; if( $line =~ /^\n+$/ ){ $bool = 0; } } # end while VOL close (VOL);
1 2 3 4 5 6 7 8 9 10 11 12 13
my $string = ""; open (VOL, "$ssh $filer aggr show_space $aggr |") || die "Cannot connect to $filer: $! \n"; while (my $line = <VOL>) { $string .= $line; } # end while VOL close (VOL); my @parts = split /\n\n/,$string; for my $part (@parts){ next unless $part =~ m!^\s*Volume!; print ("Habe: $part\n"); }
5 Einträge, 1 Seite |