moderated >> Perl source from running program.

by Udaya Kumar.R » Tue, 03 Aug 2004 14:23:04 GMT

Hi ,

I have some urgent requirement. I have a program say, xyz, running.
Now accidently i overwritten this program, but the program is still
running. Is there anyway i can get the perl source back ?

Pls, respond quickly. It will be of great help.

bye.
Uday.


Similar Threads

1. How to sort a large flat file with PERL and run a perl sort program

First let me say I am very new to Perl of a sort .... get the joke..
Seriously, I stumbled upon a sort routine the other day on the web
that does sort my 90 mb file of rec length = 103 quite nicely for me
.... but as the file gets bigger ... i run into ram issues all over
again ,,., my unix sort dies at 40mb ...

This code works:

#!/usr/bin/perl
open (ORIGFILE, "H2Z_ZDL0.000");
open (FINALFILE, ">sorted.txt");
print FINALFILE sort(<origfile>);
close (FINALFILE);
close (ORIGFILE);


I have looked at this other code gotten from an old post and cannot
see why it will not work and how to invoke it .... can someone help me
out here??

#!/usr/bin/perl

open( FILE, "<", $the_input_file ) or die horribly;
open( TAGS, ">+", $temp_file ) or die horribly;

my @positions;
while(1) {
    defined(my $floc = tell FILE) or die horribly;
    defined(my $tloc = tell TAGS) or die horribly;
    my $record = get_record(\*FILE) or last;
    my $normal = normalize($record);
    print TAGS $normal;
    push @positions => [$tloc, $floc];
}

foreach( sort {
   do { seek TAGS, $a->[0] or die horribly; read_tag(\*TAGS) } cmp
   do { seek TAGS, $b->[0] or die horribly; read_tag(\*TAGS) }
} @positions ) {
   seek FILE, $_->[1], 0 or die horribly;
   print get_record(\*FILE);

~
"tags.sort.pl" 22 lines, 629 characters
__________________________________________________________________
i get this when i run it/....
>perl  tags.sort.pl H2Z_ZDL0.000 tempyfile
Too many arguments for open at tags.sort.pl line 3, near
"$the_input_file ) "
Too many arguments for open at tags.sort.pl line 4, near "$temp_file )
"
Not enough arguments for seek at tags.sort.pl line 17, near "] or"
Not enough arguments for seek at tags.sort.pl line 18, near "] or"
Missing right bracket at tags.sort.pl line 22, at end of line
syntax error at tags.sort.pl line 22, at EOF
Execution of tags.sort.pl aborted due to compilation errors.

MY version of perl : listed below
my version of aix is: listed below
This is perl, version 5.005_03 built for aix
AIX pbsxdr00041 2 5 000258CA4C00

______________________________________________________________________________

Also I have a general question about the best way to sort a really
large
flat file of lets say 90 to 200 mb with limited ram available... how
would you do it....is perl best or unix sort or some combination or
what??
IS there a cpan module available... i have tried ...File-Sort version
1.00 or 1.01 ???? and its pudge sample perl bootstrap program and even
with
the y option set and not setting the u option ... the best I got it to
do was
to sort 300,000 records out of a 400,000 record file sent into it ...
with no error messages generated ... not very nice at all ....
shouldn't perl or the program have detected an error somewhere and
raised an alarm??

Thanks for any and all help here!!!!
Sincerely,
Andrew, perl coder in training.

2. Why a program ran with mod_perl runs slower? - Perl

3. Running another program in current program

4. [OT] generating C source from Perl source - Perl

5. generating C source from Perl source

Greetings,

I'd like to know if there's any tool available that generates C source
based on some Perl program. The standard B::C doesn't do what I need,
since it generates code that deals with Perl's internal representation,
I need something more literal, that would automatically convert the
sub-routine calls, builtin functions, conditional evaluations, etc, and
maybe even build structs out of perl hashes and build calls to malloc
(sic). I'm not even sure its possible to do so, but who knows?
The reason I need this translation is that my computer science
graduation course changed it's schedule and now I'm being forced to
watch some basic programming classes because of bureaucratic issues
(even though I'll by graduating next semester), and my teacher wants
all the homework done in C. Since I already work with Perl for quite
some time and am pretty well familiarized with all the key programming
concepts, I'd like to save some time (to work on my final paper) by
doing my homework in Perl and then convert it to C in order to please
the teacher, plus I'm too lazy to go up the attic and undig all my C
literature ;-).
Thanks in advance.

6. Why is my ILE Perl Program not running - AS/400

7. whats the perl command to run/execute a program or script

Hi,
Whats the perl command to run a script or program.
Thanks

8. Running perl program at startup - Perl