/
dim81
/
learning-spark
Обзор
Документация
Войти
/
dim81
/
learning-spark
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/perl/splitwords.pl
14 строк
380 B
Holden Karau
Simple splitwords perl example we can call from pipe
14 июн 2014, 01:37
14 июн 2014, 01:37
c5610d1
Код
Авторство
О чём код?
#!/usr/bin/perl use strict; use warnings; # This is a simple perl example of how to work with pipe interface # Here we read in each line and ouput the corresponding words # This is equivelent to rdd.flatMap(_.split($SEPARATOR)) while (my $line = <>) { chomp ($line); my @words = split($ENV{'SEPARATOR'}, $line); foreach my $word (@words) { print $word."\n"; } }