Hi Randal, Edward, and all. This message is in UTF-8. ... Well, just to be a bit pedantic: \d matches any digit character in Unicode. As a result: [IRC_LOG] ...
This may be a simple question, but I have searched for this answer. Suppose I have a multi-di array. I can make it sort by any one element. But what I need...
... Tim> Suppose I have a multi-di array. I can make it sort by any one Tim> element. But what I need to sort by two? In my simple example Tim> below, what...
Thanks Randall. I was close. I was using "cmp" instead of <=> for the number portion. Thanks again. I did not know about the other listserver, and found this...
Hi I'm trying to search and replace text in one file and save it to a new file. I tried the code below but it seems that I am just simply copying the INFILE...
Hi there, okay I have a Parallel::ForkManager question. I am just starting off using it. I am getting errors and not sure completely how to mitigate them. I...
... mablci> Hi I'm trying to search and replace text in one file mablci> and save it to a new file. I tried the code below but mablci> it seems that I am just...
I am just wondering if it is getting confused by the "next" statement. Can you try this code below with a foreach and see if it works with that? Tim foreach...
I've boiled a problem in a script I'm writing down to the following code: #!/usr/bin/perl my @array = {"string a - ", "string b - "}; @array .= my_sub(); print...
Someone else might have a better answer, but this works: use strict; use warnings; my @array = ("string a - ", "string b - "); my $arraytotal = @array; my...
27142
Brian F. Yulga
byulga@...
Apr 13, 2011 10:52 pm
Hm, I may not understand the problem correctly. I'm not sure if @array ever has more than two items, or if &my_sub needs to take this into account (string 3,...
... You are using a hash operator {} in an array assignment. You will end up with an array of hashes, not an array. Always, always, always test your...
Hi, I am trying to move array elements (populated from the <STDIN>) into a hash as pairs [i] and [i + 1] and then print them out using the code below. If I...
Hi, I'm trying to use the Padre IDE for perl. From what I have read I guess it is not really a bonified IDE. However, I have read that one can at least use it...
... mablci> last if ($kv == "stop"); This is a numeric comparison with something that is numerically a "0". Did you want that, or perhaps an "eq" instead of...
Hello M, Adding to what Randal already mentioned, you should pop the 'stop' out of @kv immediately after the following loop: =pod code while ($kv = <STDIN>) { ...
... Or just don't add 'stop' in the first place: while ( my $kv = <STDIN> ) { chomp $kv; last if $kv eq 'stop'; push @kv, $kv; } Charles Clarkson -- Mobile...
#!/usr/bin/perl -w use strict; my %hash; my $kv; my @kv; my @v; my $i; my $key; my $value; #create key - value pairs to go into a hash by first entering each ...
... Edward> my %hash; Edward> my $kv; Edward> my @kv; Edward> my @v; Edward> my $i; Edward> my $key; Edward> my $value; I stopped reading here. Never...
Hi all, I am supposed to write a perl code that uses SFTP to transfer one file from my server to another server. The arguments are supposed to be read from a...
... Hitarth> I am supposed to write a perl code that uses SFTP to transfer Hitarth> one file from my server to another server. Sounds a bit like homework. Can...
... Randal, you know it's impossible to prove a negative. Hitarth, don't let Randal get to you. I normally don't answer questions about modules I don't have...
... Shawn> Randal, you know it's impossible to prove a negative. Sure he can. He can give a context that doesn't make it sound artificial. Which he almost...
Hi, I want a simple perl script which takes my file results.txt and uploads it in the site http://my_company_project_site/results.txt How can i do it? thanks...