You want something like this:
#!/software/bin/perl
use warnings;
use strict;
my $file = "example.txt";
open my $in, '<', $file or die "Cannot open '$file' because: $!";
while ( <$in> ) {
next if /^#/;
chomp;
my ( $key, @fields ) = split /\t/;
print map "$key\t$_\n", @fields;
thanks a lot Rob
I would like an output without the $VAR...
so I did add this after the push function and it is perfect, thanks a
lot again
foreach my $number(@othernumbers){print $rownum,"\t",$elet, "\n";}
#!/usr/local/bin/perl
use strict;
use warnings;
my $fh;
my %results;
open ( $fh,
nathalie wrote:
Hi
Hello,
I have this format of file: (see attached example)
1 3206102-3207048 3411782-3411981 3660632-3661428
2 4481796-4482748 4483180-4483486
and I would like to change it to this
1 3206102-3207048
1 3411782-3411981
1 3660632-3661428
2 4481796-4482748
2 4483180-4483486
On Thu, May 31, 2012 at 11:37 AM, nathalie wrote:
>
>
> Hi
> I have this format of file: (see attached example)
> 1 3206102-3207048 3411782-3411981 3660632-3661428
> 2 4481796-4482748 4483180-4483486
>
>
> and I would like to change it to this
> 1 3206102-3207048
> 1 34117
Hi
I have this format of file: (see attached example)
1 3206102-3207048 3411782-3411981 3660632-3661428
2 4481796-4482748 4483180-4483486
and I would like to change it to this
1 3206102-3207048
1 3411782-3411981
1 3660632-3661428
2 4481796-4482748
2 44