Dharshana Eswaran wrote:
>
> The output what i m getting is
>
> The input file contains message as follows:
>
> D0 1A 81 03 01 21 80 82 02 81 02 8D 0F 04 54 6F 6F 6C 6B 69 74 20 54 65 73
>
> Sample output:
>
> ENTER THE SEQUENCE between[1-3]:
> 2 1 1 3
>
> The output file contains:
>
> D01A81
D. Bolliger am Dienstag, 2. Januar 2007 12:55:
> Dharshana Eswaran am Dienstag, 2. Januar 2007 08:02:
[snip]
> > $seq = ;
> > chop($seq);
> > @seq = split(/ +/, $seq);
> > $seq_len = @seq;
[snip]
> > for($i=0; $i<$seq_len; $i++) {
> > $read1[$i] = $table{$structure{$seq[$j]}};
> > syswrite
On 1/3/07, John W. Krahn <[EMAIL PROTECTED]> wrote:
Dharshana Eswaran wrote:
> Hi All,
Hello,
> I have a piece of code which reads as shown below:
>
> unless (open(IN, "in.txt")) {
>die("Cannot open input file \n");
You should include the $! variable in the error message so you know *
> $input = ;
> @input = split(/ +/, $input);
> $new = join ("", @input);
Why not just modify the string instead of splitting and joining:
( my $new = ) =~ s/ +//g;
I believe the above line does not work. It must be
( my $new = ) =~ s/ \+//g;
Whilst this email has been checked for all known
Dharshana Eswaran wrote:
> Hi All,
Hello,
> I have a piece of code which reads as shown below:
>
> unless (open(IN, "in.txt")) {
>die("Cannot open input file \n");
You should include the $! variable in the error message so you know *why* it
failed.
>}
> binmode(IN);
You appear to
Dharshana Eswaran am Dienstag, 2. Januar 2007 08:02:
> Hi All,
Hi Dharshana Eswaran
> I have a piece of code which reads as shown below:
>
> unless (open(IN, "in.txt")) {
> die("Cannot open input file \n");
> }
> binmode(IN);
>
> unless (open(OUT, "+>output.txt")) {
> die("Can