Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
kinda perl split ...
- X-seq: zsh-users 10052
- From: Marc Chantreux <marc.chantreux@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: kinda perl split ...
- Date: Tue, 21 Mar 2006 14:42:12 +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi all,
i'm always searching for shortest ways in zsh (coming from perl world).
in perl :
while ( <>) {
chomp;
my ( $a , $b ) = split /\t/;
print "b=$b a=$a"
}
in zsh :
while {read} {
content=( ${(ps:\t:)REPLY} )
a=$content[1]
b=content[2]
print "b=$b a=$a"
}
is there something more faster to initialize a and b (peraps closer than
split) ?
regards
mc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author