Hi
Is there any way to use UNIX and Perl to automate sending e-mail. I got a dynamic changing file that send out to people in my mailing list and want to experinment to see if Perl and UNIX can send it out for me when the content is change. I found a Perl source code but dont really know how to... (4 Replies)
#!/usr/bin/perl
open (DATA, file.txt);
@array = <DATA>;
close (DATA);
open (DATA, ">$file.txt");
for (@array) {
s/text/replace text/;
push(@contents,$_);
}
seek(DATA, 0, 0);
print DATA (@contents);
close(DATA);
could someone please explain how this works. i've been... (3 Replies)
I had posted previously about this problem I had.
I have multiple text files with hundreds of lines of the following type:
2000001 34 54 234 2000001
32 545 2000001 -2000001 77 2000001 44 2000001 998 2000001
77 32 2000001 45 23 111 89
98 75 23 34 999
.
.
.
etc...
What I wanted was... (2 Replies)
I am trying to take first 3 columns in a file which matches the word "abc", but i am getting the below error,
<error>
Global symbol "@F" requires explicit package name at ./new.pl
</error>
whereas when i give the below,grep abc /home/test/file.txt|perl -lane 'print \"$F $F $F\" in unix prompt... (4 Replies)
Hello everyone,
I have a perl script which takes various command line options from user like :
test.pl -i <input_file> -o <output_file> -d <value> -c <value>
Now I have multiple input files in a directory:
<input_file_1>
<input_file_2>
<input_file_3>
<input_file_4>
.....
....
...... (6 Replies)
i am a beginner, i want to make a program that takes any command line arguments... and print it out in reverse.
ie. if the command line argument is "thanks for helping me"
i want it to output "me helping for thanks" :D
i have tried using the reverse command, but i cant get it working!!
... (3 Replies)
I wish to know if there is any limitation in using unix commands in perl script or it is just we should avoid using them in our perl script.
For e.g Below is the command to get the recent file in a dir.:
$lcsvFile = `cd "$l_inputfilepath";ls -1t *.CSV|tail -1`
Is there any harm in coding... (1 Reply)
In the below perl executes if one file is processed perfect. However, when multiple files are processed in batch which is preferred I get the below error that I can not seem to fix it as the '' necessary for the command to execute, but seem to only work for one -arg option. Thank you :).
... (2 Replies)
I have a file with two line, one is header, the other actual value:
TYPCD|ETID2|ETID|LEG ID|PTYP|PTYP SUB|TRD STATUS|CXL REASON|CACT|CACTNM|ENCD|ENC
D NM|TRDR|ASDT|TRDT|MTDT|STDT|LS|SECID|SECID TYP|SECNM|PAR|STCC|MARKET PRICE|DIS
MARKET PRICE|MARKET PRICE CURRENCY|SRC OF SETTLEMENT... (2 Replies)
Discussion started by: digioleg54
2 Replies
LEARN ABOUT DEBIAN
pperl
PPERL(1p) User Contributed Perl Documentation PPERL(1p)NAME
PPerl - Make perl scripts persistent in memory
SYNOPSIS
$ pperl foo.pl
DESCRIPTION
This program turns ordinary perl scripts into long running daemons, making subsequent executions extremely fast. It forks several processes
for each script, allowing many processes to call the script at once.
It works a lot like SpeedyCGI, but is written a little differently. I didn't use the SpeedyCGI codebase, because I couldn't get it to
compile, and needed something ASAP.
The easiest way to use this is to change your shebang line from:
#!/usr/bin/perl -w
To use pperl instead:
#!/usr/bin/pperl -w
WARNINGS
Like other persistent environments, this one has problems with things like BEGIN blocks, global variables, etc. So beware, and try checking
the mod_perl guide at http://perl.apache.org/guide/ for lots of information that applies to many persistent perl environments.
Parameters
$ pperl <perl params> -- <pperl params> scriptname <script params>
The perl params are sent to the perl binary the first time it is started up. See perlrun for details.
The pperl params control how pperl works. Try -h for an overview.
The script params are passed to the script on every invocation. The script also gets any current environment variables, the current working
directory, and everything on STDIN.
Killing
In order to kill a currently running PPerl process, use:
pperl -- -k <scriptname>
You need to make sure the path to the script is the same as when it was invoked.
Alternatively look for a .pid file for the script in your tmp directory, and kill (with SIGINT) the process with that PID.
ENVIRONMENT
pperl uses the PPERL_TMP_PATH environment variable to determine the directory where to store the files used for inter-process
communication. By default, the subdirectory .pperl of the user's home directory is used.
BUGS
The process does not reload when the script or modules change.
$^S is not represented identically with respect to perl, since your script will be run within an eval block
AUTHOR
Matt Sergeant, matt@sergeant.org. Copyright 2001 MessageLabs Ltd.
SEE ALSO
perl. perlrun.
perl v5.14.2 2011-11-15 PPERL(1p)