Which function to convert Hex to Character

2012-03-13 Thread 周 文
Hi,   I get a large file, some part of which is Ascii code, some are not. I am looking for a function (subroutine) to convert Hex(Ascii code) to character. What is it?   MONITORED MESSAGE: 02D1 4D05 0650 0002 00 19 BA2D 0004 00 00 00 00 00 0A 01 02 02 00 00 00 00 00 00 00 00 00 00 00 00 07

how to extract one block out

2012-03-13 Thread lina
Hi, Here I have ...some blocks ... @article{Bi07_chen, author = {Chen, J. P. and Zhang, X. and Fernandez, A.}, journal = BIOINFOR, volume = {23}, number = {5}, pages = {563-572}, year = {2007} } @article{MP08_Crespo, author = {Crespo, A. and Fernandez, A.}, journal = MO

How to end a loop

2012-03-13 Thread lina
Hi, here is the on-going script. #!/usr/bin/env perl use strict; use warnings; use Carp qw(croak); use autodie qw(open close); use File::Basename; croak "Usage: ./bibextract.pl tex_file.tex" unless defined $ARGV[0]; my $infile = $ARGV[0]; my $tex_file = $infile; my $bib_filename = "/home/lina

Re: using cmp for if statement comparisons

2012-03-13 Thread John W. Krahn
Noah wrote: Hi there, Hello, I am trying to get two conditions matched how can I get if ( ($source_location eq $destination_location ) && ( $source_device < $destination_device ) ) { That should be: if ( $source_location eq $destination_location && $source_device lt $destination_device )

using cmp for if statement comparisons

2012-03-13 Thread Noah
Hi there, I am trying to get two conditions matched how can I get if ( ($source_location eq $destination_location ) && ( $source_device < $destination_device ) ) { and if ( ($source_location eq $destination_location ) && ( $source_device > $destination_device ) ) {

Re: while: both syntaxes cant solve my problem

2012-03-13 Thread Shawn H Corey
On 12-03-13 12:11 PM, oxy wrote: I have a problem with the following structure: while(){$thevariable=$1 if (/variable1=(.*)/)}; Now I wanna be sure that variable1 was really set in the above statement (it could have an old value from a previous embracing loop). Then I tried: while(){if (/varia

Re: while: both syntaxes cant solve my problem

2012-03-13 Thread Jim Gibson
On 3/13/12 Tue Mar 13, 2012 9:11 AM, "oxy" scribbled: > hi all, > > I have a problem with the following structure: > > while(){$thevariable=$1 if (/variable1=(.*)/)}; > > Now I wanna be sure that variable1 was really set in the above > statement (it could have an old value from a previous em

while: both syntaxes cant solve my problem

2012-03-13 Thread oxy
hi all, I have a problem with the following structure: while(){$thevariable=$1 if (/variable1=(.*)/)}; Now I wanna be sure that variable1 was really set in the above statement (it could have an old value from a previous embracing loop). Then I tried: while(){if (/variable1=(.*)/) {$thevari