print join '|', "@fields[0,1]\n"
Running join on a scalar string like that will have no effect. You should join a list instead.
#!/usr/bin/perl use strict; use warnings; my @fields = qw/foo bar baz/; print join ('|', @fields[0,1]) . "\n";
In reply to Re: Join without space in this perl script
by hippo
in thread Join without space in this perl script
by utpalmtbi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |