|
Support,
Need some help regarding CPU usage. What could be the reason on PERL COMMAND consuming 100% cup usage? Is this Bad? What's the worst thing can happen? This just hapened today.
25930 daemon 20 0 29452 4216 1308 R 100 0.1 31:45.51 perl
5028 mysql...
Started by richardroi on
, 20 posts
by 4 people.
Answer Snippets (Read the full thread at net):
0 01:10 pts/8 00:00:00 /usr/bin/perl /usr/share/astguic
root 31227 5695 0 May07 pts/9 00:00:00, if it comes back the same then theres a problem with the vicidial perl scripts or the data itself has view of what actual perl....
|
|
Possible Duplicates:
How can I use a variable’s value as a Perl variable name?
How can I use a variable as a variable name in Perl?
I will show an example of what I need:
@a_1=(1..10); @a_2=(11..20); $index=1; print "@{a_$index}\n";
I need it to print...
Started by guy ergas on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I'd recommend using....
How can I use a variable as a variable name in Perl?
The top answer to that question points to the Perl FAQ: How can I use a variable as a variable name?
Using symbolic references (constructing to go wrong.
To an array.
|
|
I'm running a Perl script (both with 5.8.4) on two different machines (one Solaris 5.10, the other OpenSolaris 5.11). The output of the two scripts differs in the following way:
Solaris 5.10
$ perl myscript.pl is' £ ä º <ä ¼ sa ... ³ ä º žÃ ......
Started by ankimal on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If you could show us the perl -V from each of them, we might be able to give you date from the perl side....
The perls (lowercase perl, I'm talking about the executable here, Perl fans ;) ) could be compiled differently.
|
Ask your Facebook Friends
|
I have a shell script, pretty big one. Now my boss says I must rewrite it in Perl. Is there any way to write a Perl script and use the existing shell code as is in my Perl script. Something similar to Inline::C .
Is there something like Inline::Shell?...
Started by not-exactly-a-unixhater on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want positional columns, you can use:
while(<>) { print substr($_, 5, 10Well…
You could start your "Perl" script with:
#!/bin/bash
Then, assuming bash was installed at that location, perl would automatically....
And only that.
|
|
I'm just curious why one would choose to use an anonymous subroutine, versus a named one, in Perl. Thanks.
Answer Snippets (Read the full thread at stackoverflow):
Is a sub reference $zz=1; sub....
My $thing=sub...
", $i, $doubler->($i), $tripler->($i); } __END__ C:\Temp> v 1 2 3 2 4 6 3 6 9 4 8 12 5 10 15 6 12 18 7 14 21 8 16 24 9 18 27 10 20 30
First: sub thing is a sub.
|
|
What is the difference between the scalar and list contexts in Perl and does this have any parallel in other languages such as Java or Javascript?
Answer Snippets (Read the full thread at stackoverflow):
Various operators in Perl are context sensitive and produce different results in list ....
Array: 1 2 4 8 16 first: 1 copy1: 1 2 4 8 16 copy2: 1 2 4 8 16 count: 5
Now:
$first contains 1 i've used has similar concepts.
|
|
You sometimes hear it said about Perl that there might be 6 different ways to approach the same problem. Good Perl developers usually have well-reasoned insights for making choices between the various possible methods of implementation.
So an example ...
Started by keparo on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
File::Find in this case works....
Edit: It could also be 'find.
Days_ago(10) ) ->name( qr/^batch[_-]\d{8}-\d{4}\.run\.txt' from perl code through shell, returning results to an array or hash.
Find::Rule->new ->mtime( '<'.
|
|
What's the best technique for handling US Dollar calculations in Perl?
Especially: the following needs to work:
$balance = 10; $payment = $balance / 3; # Each payment should be 3.33. How best to round amount? $balance -= $payment * 3; # assert: $balance...
Started by Larry K on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Balances = (10, 1, .50, 5, 7, 12, 3, 2, 8, 1012); for my $balance (@balances) { my @stream = get:
C:\Temp> p 10 : 3.33 3.33 3.34 : 10 1 : 0.33 0.33 0.34 : 1 0.5 : 0.16 0.16 0.18 : 0.5 5 : 1.66 for output.....
|
|
Perl 6 has really shaped up in terms of which features we can expect to see implemented in the final language, when it comes. Some of them are already available through Perl 6 modules for Perl 5 from CPAN. So which features are most compelling, exciting...
Started by Adam Bellaire on
, 23 posts
by 14 people.
Answer Snippets (Read the full thread at stackoverflow):
I don't thinkNot a feature of Perl 6....
Perl 5's parameter handling is one of its weakest points say it would be very nice to have the // and //= operators even in Perl 5.
Parameter lists.
Typing--is one cool feature.
|
|
I would like to be able to (reasonably) arbitrarily set my execution point in the Perl debugger. E.g., moving immediately prior to an if from the body of the if and setting a variable.
Rummaging around the perldebug(and perldebguts and the perl debugger...
Started by Paul Nathan on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If $GOTO; print "nothing\n"; goto $GOTO if $GOTO; }
Sample debugging session:
$ perl -d debuggoto.pl; $b) { DB<1> main::(debuggoto.pl:5): goto $GOTO if $GOTO; DB<1> main::(debuggoto.pl:6): if ($a > $c) { DB<1> main:....
|