Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

kinda perl split ...



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