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 REDHAT
perlqnx
PERLQNX(1) Perl Programmers Reference Guide PERLQNX(1)NAME
README.qnx - Perl version 5 on QNX
DESCRIPTION
As of perl5.7.2 all tests pass under:
QNX 4.24G
Watcom 10.6 with Beta/970211.wcc.update.tar.F
socket3r.lib Nov21 1996.
Some tests may complain under known circumstances. See below and hints/qnx.sh for more information.
Under QNX 6.1.0 there are still a few tests which fail. See below and hints/qnx.sh for more information.
Required Software for Compiling Perl on QNX4
As with many unix ports, this one depends on a few "standard" unix utilities which are not necessarily standard for QNX4.
/bin/sh
This is used heavily by Configure and then by perl itself. QNX4's version is fine, but Configure will choke on the 16-bit version, so
if you are running QNX 4.22, link /bin/sh to /bin32/ksh
ar This is the standard unix library builder. We use wlib. With Watcom 10.6, when wlib is linked as "ar", it behaves like ar and all is
fine. Under 9.5, a cover is required. One is included in ../qnx
nm This is used (optionally) by configure to list the contents of libraries. I will generate a cover function on the fly in the UU direc-
tory.
cpp Configure and perl need a way to invoke a C preprocessor. I have created a simple cover for cc which does the right thing. Without
this, Configure will create its own wrapper which works, but it doesn't handle some of the command line arguments that perl will throw
at it.
make
You really need GNU make to compile this. GNU make ships by default with QNX 4.23, but you can get it from quics for earlier versions.
Outstanding Issues with Perl on QNX4
There is no support for dynamically linked libraries in QNX4.
If you wish to compile with the Socket extension, you need to have the TCP/IP toolkit, and you need to make sure that -lsocket locates the
correct copy of socket3r.lib. Beware that the Watcom compiler ships with a stub version of socket3r.lib which has very little functional-
ity. Also beware the order in which wlink searches directories for libraries. You may have /usr/lib/socket3r.lib pointing to the correct
library, but wlink may pick up /usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure they both point to the correct library, that is,
/usr/tcptk/current/usr/lib/socket3r.lib.
The following tests may report errors under QNX4:
ext/Cwd/Cwd.t will complain if `pwd` and cwd don't give the same results. cwd calls `fullpath -t`, so if you cd `fullpath -t` before run-
ning the test, it will pass.
lib/File/Find/taint.t will complain if '.' is in your PATH. The PATH test is triggered because cwd calls `fullpath -t`.
ext/IO/lib/IO/t/io_sock.t: Subtest 14 is skipped due to the fact that the functionality to read back the non-blocking status of a socket is
not implemented in QNX's TCP/IP. This has been reported to QNX and it may work with later versions of TCP/IP.
QNX auxiliary files
The files in the "qnx" directory are:
qnx/ar
A script that emulates the standard unix archive (aka library) utility. Under Watcom 10.6, ar is linked to wlib and provides the
expected interface. With Watcom 9.5, a cover function is required. This one is fairly crude but has proved adequate for compiling perl.
qnx/cpp
A script that provides C preprocessing functionality. Configure can generate a similar cover, but it doesn't handle all the command-
line options that perl throws at it. This might be reasonably placed in /usr/local/bin.
Outstanding issues with perl under QNX6
The following tests are still failing for Perl 5.7.3 under QNX 6.1.0:
op/sprintf.........................FAILED at test 91
lib/Benchmark......................FAILED at test 26
This is due to a bug in the C library's printf routine. printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires '0.000000e+00'. QNX
has acknowledged the bug and it should be fixed in 6.2.0.
AUTHOR
Norton T. Allen (allen@huarp.harvard.edu)
perl v5.8.0 2003-02-18 PERLQNX(1)