From: "shawn wilson"
> On Aug 16, 2011 9:48 PM, "John W. Krahn" wrote:
>>
>> Joseph L. Casale wrote:
>>>
>>> What is the correct way to quickly assign the result of a regex against
>>> a cmdline arg into a new variable:
>>>
>>> my $var = ($ARGV[0] =~ s/(.*)foo/$1/i);
>>
>>
>> my ( $var ) = $ARGV[
At 11:43 PM -0400 8/16/11, shawn wilson wrote:
On Aug 16, 2011 9:48 PM, "John W. Krahn" wrote:
Joseph L. Casale wrote:
What is the correct way to quickly assign the result of a regex against
a cmdline arg into a new variable:
my $var = ($ARGV[0] =~ s/(.*)foo/$1/i);
my ( $var ) = $AR
On Aug 16, 2011 9:48 PM, "John W. Krahn" wrote:
>
> Joseph L. Casale wrote:
>>
>> What is the correct way to quickly assign the result of a regex against
>> a cmdline arg into a new variable:
>>
>> my $var = ($ARGV[0] =~ s/(.*)foo/$1/i);
>
>
> my ( $var ) = $ARGV[0] =~ /(.*)foo/i;
IIRC, that rede
Joseph L. Casale wrote:
What is the correct way to quickly assign the result of a regex against
a cmdline arg into a new variable:
my $var = ($ARGV[0] =~ s/(.*)foo/$1/i);
my ( $var ) = $ARGV[0] =~ /(.*)foo/i;
John
--
Any intelligent fool can make things bigger and
more complex... It takes a
foreach $str1 (@arr1){
foreach (@arr2) {
@arr3 = split(/ /,"$_");
print "array = @arr3 element0 = $arr3[0] element1 = $arr3[1]"; #this
is just to check, it showing values 0 and 1 as correctly assigned
print "$str1";
}
}
arr1 contains lines like: (which will be values of str1 with eac
>Yes, you can use:
>
>( my $var = $ARGV[0] ) =~ s/(.*)foo/$1/i;
Rob/Octavian,
Thanks for the quick help!
jlc
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
From: "Joseph L. Casale"
What is the correct way to quickly assign the result of a regex against
a cmdline arg into a new variable:
my $var = ($ARGV[0] =~ s/(.*)foo/$1/i);
Obviously that's incorrect but is there a quick way without intermediate
assignment?
Thanks!
jlc
Yes, you can use:
( my
On Tue, Aug 16, 2011 at 8:27 PM, Joseph L. Casale wrote:
> What is the correct way to quickly assign the result of a regex against
> a cmdline arg into a new variable:
>
> my $var = ($ARGV[0] =~ s/(.*)foo/$1/i);
>
> Obviously that's incorrect but is there a quick way without intermediate
> assign
What is the correct way to quickly assign the result of a regex against
a cmdline arg into a new variable:
my $var = ($ARGV[0] =~ s/(.*)foo/$1/i);
Obviously that's incorrect but is there a quick way without intermediate
assignment?
Thanks!
jlc
--
To unsubscribe, e-mail: beginners-unsubscr...@pe
The problem is :admin is not in now.
2011/8/17 Wernher Eksteen
> If you can justify the need for it and the importance thereof, surely your
> Linux/Unix Admin can install it
> for you or provide you with the necessary sudo access so you can do it
> yourself. That probably
> depends on various fa
Matt wrote:
I believe you can sort an array like so:
sort @my_array;
That should be:
@my_array = sort @my_array;
I need to sort a string though.
I have $a_string that contains:
4565 line1
2345 line2
500 line3
etc.
Obviously \n is at end of every line in the string. I need it sorted.
On Tue, Aug 16, 2011 at 12:04 PM, Matt wrote:
> I believe you can sort an array like so:
>
> sort @my_array;
>
> I need to sort a string though.
>
> I have $a_string that contains:
>
> 4565 line1
> 2345 line2
> 500 line3
> etc.
>
> Obviously \n is at end of every line in the string. I need it sor
If you can justify the need for it and the importance thereof, surely your
Linux/Unix Admin can install it
for you or provide you with the necessary sudo access so you can do it
yourself. That probably
depends on various factors, ie if that's a production system, if change
control needs to take pla
Look to local::lib in http://search.cpan.org/~apeiron/local-lib/lib/local/lib.pm
On Tue, Aug 16, 2011 at 18:02, universe sheep wrote:
> Without a root permission, I can't install perl module through normal way
> such as CPAN. But I have to use this module(XML::Quote).
> I have tried to copy the .
sort like string or like numbers?
On Tue, Aug 16, 2011 at 18:04, Matt wrote:
> I believe you can sort an array like so:
>
> sort @my_array;
>
> I need to sort a string though.
>
> I have $a_string that contains:
>
> 4565 line1
> 2345 line2
> 500 line3
> etc.
>
> Obviously \n is at end of every li
I believe you can sort an array like so:
sort @my_array;
I need to sort a string though.
I have $a_string that contains:
4565 line1
2345 line2
500 line3
etc.
Obviously \n is at end of every line in the string. I need it sorted.
How would I approach this?
--
To unsubscribe, e-mail: beginner
Without a root permission, I can't install perl module through normal way
such as CPAN. But I have to use this module(XML::Quote).
I have tried to copy the .pm file to my own lib directory directly, but it
says "can't locate loadable perl module ".
Is there any other way to install perl modules wi
On Tue, Aug 16, 2011 at 11:00 AM, ANJAN PURKAYASTHA
wrote:
> print("$bacteria->id\t$bacteria->name\n");
...
> and the following ouput:
> Bio::Taxon=HASH(0x158dbe0)->id Bio::Taxon=HASH(0x158dbe0)->name
You appear to intend to call methods on $bacteria, but since you're
within a string what's re
On Aug 16, 2011 11:02 AM, "ANJAN PURKAYASTHA"
wrote:
>
> I wrote a short test script for the Bio::DB::Taxonomy module:
>
> #!/usr/bin/perl -w
> use strict;
> use Bio::DB::Taxonomy;
>
> my ($nodesfile, $namesfile)= ('nodes.dmp', 'names.dmp');
>
> my
Hello all,
I posted this question in the bioperl forum- no replies after a day, so
let's see if anyone here can help.
I wrote a short test script for the Bio::DB::Taxonomy module:
#!/usr/bin/perl -w
use strict;
use Bio::DB::Taxonomy;
my ($nodesfile
20 matches
Mail list logo