Ok, I am thinking about developing a small little web app to help teach C to people. So you can type some C code into a text area, then a CGI Perl script or something similar would compile the code, then possibly execute it showing the results in another text area.
My concern of course is... (1 Reply)
if anyone knows how to do the loop and the function listed, please let me know it would be a great help. Thanks!
•Create an array NUM with the following ten values in it:
14, 25.6, 43, 22, 412.14, 819, 2, 721, 7.218, 11.9
•Print the array NUM
•Create an array COLOR with the following... (1 Reply)
I have 2 files , one is master file and another file i am genearting which contains Number of fails for all host & version.
The first file is master file which contains 2 column, Test Case name and Product Name:
daily/DB/attach/attach_redundancy.exp: YRS
daily/DB/help/help.exp: ... (0 Replies)
Is there a way to see or print a sub code?
Sometime a sub could be already defined, but in the debug mode (so, interactively) it could be already out of screen.
So, I would think about a way to check if the sub is defined (just 'defined' is not a problem) and how it is defined.
Also, if... (4 Replies)
Hi,
plz see the below code , i have catch the file "Orders.20110714.out "file
as a Orders*.out. but it giving me an error .it does not open the file.
if the same thing i have done by code
code-> ls Orders*.out then it gives me the output
Orders.20110714.out
i am trying apply the... (1 Reply)
Hi
Please read the below information carefully and help me to solve the issue .
I want to know ,how to catch the word before perticular word using perl code??
Eg:
if the row contains
===========================
Original Order Tuple
Duplicatel Execution Tuple
... (1 Reply)
What is the meaning of below code, which is capturing from one file .
$runDate = $1 if $str =~ m/,"TransactTime":"({10})/; # get transaction date as run date
Is it the date from the first line of file or last line of file??? (Note:Each line from the file contains date) (2 Replies)
Hi All,
I new to perl scripting, trying to write a program to get multiple inputs from the users and it should be stored in one variable. can some one help me with it .
here is the sample code i tried , but its not working.
# cat array.pl
#!/usr/bin/perl
print "enter the total no of... (4 Replies)
Discussion started by: nanduri
4 Replies
LEARN ABOUT DEBIAN
heap::elem::numrev
Heap::Elem::NumRev(3pm) User Contributed Perl Documentation Heap::Elem::NumRev(3pm)NAME
Heap::Elem::NumRev - Reversed Numeric Heap Elements
SYNOPSIS
use Heap::Elem::NumRev( NumRElem );
use Heap::Fibonacci;
my $heap = Heap::Fibonacci->new;
my $elem;
foreach $i ( 1..100 ) {
$elem = NumRElem( $i );
$heap->add( $elem );
}
while( defined( $elem = $heap->extract_top ) ) {
print "Largest is ", $elem->val, "
";
}
DESCRIPTION
Heap::Elem::NumRev is used to wrap numeric values into an element that can be managed on a heap. The top of the heap will have the largest
element still remaining. (See Heap::Elem::Num if you want the heap to always return the smallest element.)
The details of the Elem interface are described in Heap::Elem.
The details of using a Heap interface are described in Heap.
AUTHOR
John Macdonald, john@perlwolf.com
COPYRIGHT
Copyright 1998-2007, O'Reilly & Associates.
This code is distributed under the same copyright terms as perl itself.
SEE ALSO Heap(3), Heap::Elem(3), Heap::Elem::Num(3).
perl v5.8.8 2007-10-23 Heap::Elem::NumRev(3pm)