Or, much more consice:
#!/usr/bin/perl use strict; use warnings; use Text::CSV; my @ports = qw(portname portID port802); my @val1 = qw(ON ON OFF); my @val2 = qw(EX EX NEX); my $csv = Text::CSV->new ({sep_char => ';', eol => "\n", auto_diag => +1 }); for (@ports) { $csv->print (*STDOUT, [ $_, shift @val1, shift @val2 ]); }
In reply to Re^4: Creating CSV file
by Tux
in thread Creating CSV file
by reez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |