Thanks so much for your reply Gunnar,
The purpose is as follows.
For example these lines:
AGCAG,AGCCG,AGCCGGGCG,AGCCAGGAG 15.188721875540
AGCGGAGCG,AGCCGAGGG,AGCGGAGGG 16.163408331891
\_/ \_/
@Array1
is there a way to iterate over the fields of a Class::Struct (in the order
they were declared)?
something like:
foreach my $i (@{my_struct->fields()}) {
print "$i = my_struct->value($i)\n";
}
yeah i know its a long shot, but perl sometimes does things for me that i
never would have beli
>
> You probably want to use the word boundary assertion:
>
> s/\bTR\b/TC/g;
>
> See "perldoc perlre".
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
Thanks! This worked.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE
Radhika Sambamurti wrote:
I am trying to substitute "TR" for "TC".
But I do not want words like "AUDIT TRAIL" to be substituted.
So my regexp is:
if( =~ / TR / ) {
s/TR/TC/g
}
But this is not exactly working.
You probably want to use the word boundary assertion:
s/\bTR\b/TC/g;
See "perldoc perl
Hi,
I am trying to substitute "TR" for "TC".
But I do not want words like "AUDIT TRAIL" to be substituted.
So my regexp is:
if( =~ / TR / ) {
s/TR/TC/g
}
But this is not exactly working.
As i want only those instances when TR is surrounded by spaces ie not part
of any other word to be substitute
> -Original Message-
> From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 06, 2004 6:09 PM
> To: jason corbett; perl beginners
> Subject: Re: Using binding in order to pass values to a sql statement.
>
>
> >
> > Hello all. I am trying to use bind_param to create
>
> Hello all. I am trying to use bind_param to create a list of values in
the form of an array. Then I want to query the data base using a basic
sql statement where each value in my list (array) will be sent to the
DBI in order to return a value. I am getting and error that says can't
call method
> -Original Message-
> From: jason corbett [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 06, 2004 5:44 PM
> To: perl beginners
> Subject: Using binding in order to pass values to a sql statement.
>
>
> Hello all. I am trying to use bind_param to create a list of
> values in the for
Hello all. I am trying to use bind_param to create a list of values in the form of an
array. Then I want to query the data base using a basic sql statement where each value
in my list (array) will be sent to the DBI in order to return a value. I am getting
and error that says can't call method "
Edward Wijaya wrote:
Is there anyway in Perl to create hash with multiple key for an
array?
Yes.
my %HoA = ( key1 => [ @array1 ] );
$HoA{key2} = $HoA{key1};
The purpose is as follows.
For example these lines:
AGCAG,AGCCG,AGCCGGGCG,AGCCAGGAG 15.188721875540
AGCGGAGCG,AGCCGAGGG,AGCGGA
Hi,
Is there anyway in Perl to create
hash with multiple key for an array?
The purpose is as follows.
For example these lines:
AGCAG,AGCCG,AGCCGGGCG,AGCCAGGAG 15.188721875540
AGCGGAGCG,AGCCGAGGG,AGCGGAGGG 16.163408331891
\_/ \_/
Mark Cohen <[EMAIL PROTECTED]> wrote:
: Hello Charles,
: I don't understand why you are getting differnet
: results. I checked approximatley 1000 records
: containing different floating points and it seems
: that the result is similar to the results I'm
: getting from SAS but I'll try to understan
Jose Nyimi wrote:
> I made a copy-paste of your above code, added the following to call f():
>
> package main;
> My::Class::f();
>
> And got the error message below:
> Global symbol "$s" requires explicit package name at try.pl line 31.
> Execution of try.pl aborted due to compilation errors.
>
-Original Message-
From: Chris Mortimore [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 05, 2004 5:19 PM
To: [EMAIL PROTECTED]
Subject: Sorting an array of hashes
I want to sort an AoH. Not each hash by its keys, but the array by the
value of one of the keys in each hash. I know how t
Edward Wijaya wrote:
> Hi,
>
> I would like to know which of this
> is better and what is the pro and cons:
>
> 1. A file "mysub.pl" which stored
> a subroutine, and later called by
> main file using: do "mysub.pl"
>
> or
>
> 2. A file "mysub.pm" and called
> in main file using : use "mysub.pm
On Aug 4, Perl said:
>die "You must enter an argument. \n" if $#ARGV <0;
I'd suggest using:
die ... if @ARGV == 0;
because it's easier to read and understand.
>$logfile = chomp ($ARGV);
Is that really your code? That doesn't make any sense to me. I think you
meant:
$logfile = $ARGV[0];
On Aug 5, Jose Alves de Castro said:
>sub trim($), for instance, means that trim will work on a scalar.
It means that trim() expects ONE argument and will enforce scalar context
on it. trim($foo) and trim(@bar) both work.
>This is useful to, instead of something such as
>
>trim($var)
>
>use som
Nyimi Jose ) wrote:
Gunnar Hjalmarsson wrote:
Shu Hung wrote:
I am writing a script to relocate some tar files in a folder.
Since those tar files are scheduled to be written daily, I want
to make sure I'm not moving any files which are being written
by other programs...
How can I do so?
You can loc
Hi,
I would like to know which of this
is better and what is the pro and cons:
1. A file "mysub.pl" which stored
a subroutine, and later called by
main file using: do "mysub.pl"
or
2. A file "mysub.pm" and called
in main file using : use "mysub.pm"
Thanks so much for your time
Regards,
Edward WIJA
> -Original Message-
> From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 06, 2004 10:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How to avoid writing files that is used by other
> programs?
>
>
> Shu Hung wrote:
> > I am writing a script to relocate some tar f
Shu Hung wrote:
I am writing a script to relocate some tar files in a folder.
Since those tar files are scheduled to be written daily, I want to
make sure I'm not moving any files which are being written by other
programs...
How can I do so?
You can lock them.
perldoc -f flock
perldoc -q "l
I am writing a script to relocate some tar files in a folder.
Since those tar files are scheduled to be written daily,
I want to make sure I'm not moving any files which are being
written by other programs...
How can I do so?
Thanks a lot
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
22 matches
Mail list logo