D. Bolliger am Dienstag, 2. Januar 2007 12:55:
> Dharshana Eswaran am Dienstag, 2. Januar 2007 08:02:
[snip]
> > $seq = <STDIN>;
> > chop($seq);
> > @seq = split(/ +/, $seq);
> > $seq_len = @seq;
[snip]
> > for($i=0; $i<$seq_len; $i++) {
> > $read1[$i] = $table{$structure{$seq[$j]}};
> > syswrite (OUT, $new, $read1[$i]);
> > print OUT ("\n");
> > $j++;
> > }
> >
> > In the above code, i m trying to read the input in bytes and display them
> > in another output file. The reading is done in different sizes (4 or 8 or
> > 32bytes), as per the sequence specifed by the User. The input file with
> > filehandle IN contains data as shown below:
> >
> > F1 2F 8A 02 05 09 00 00 00 04 2B 48 00 00 00 68
[snip]
> Then you can inspect the values in $seq[$j] (with a warn statement), and
> you'll see what's going wrong :-)
[snip]
Apologies to all :-( - and a happy new year :-)
John's answer pointed me to the fact that I did an error while trimming down
Dharshana Eswaran code; I put the IN file data into @seq, not the STDIN data.
How stupid of me.
Dani
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/