#
!/usr/bin/perl
@strs
;
push
(
@strs
,
"
|a |b|c|
"
);
push
(
@strs
,
"
a|b|c|
"
);
push
(
@strs
,
"
a|b|c
"
);
for
(
$i
=
0
;
$i
<
@strs
;
$i
++
)
{
if
(
$strs
[
$i
]
=~
/^\|/
)
{
$strs
[
$i
]
=
substr
(
$strs
[
$i
]
,
1
);
}
@elems
=
split
(
/\|/,
$strs
[
$i
]);
print
@elems
+
0
,
"
\n
"
;
print
join
(
"
,
"
,
@elems
);
print
"
\n
"
;
}