Karte mit Split & Schneiden in Perl

Wie verwende ich die Karte mit der split-Funktion zum zuschneiden der Bestandteile: $a, $b, $c und $d; von $line?

my ($a, $b, $c, $d, $e) = split(/\t/, $line);

# Perl trim function to remove whitespace from the start and end of the string
sub trim($)
{
    my $string = shift;
    $string =~ s/^\s+//;
    $string =~ s/\s+$//;
    return $string;
}
InformationsquelleAutor syker | 2010-07-02
Schreibe einen Kommentar