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
gimp::net
Net(3) User Contributed Perl Documentation Net(3)NAME
Gimp::Net - Communication module for the gimp-perl server.
SYNOPSIS
use Gimp;
DESCRIPTION
For Gimp::Net (and thus commandline and remote scripts) to work, you first have to install the "Perl-Server" extension somewhere where Gimp
can find it (e.g in your .gimp/plug-ins/ directory). Usually this is done automatically while installing the Gimp extension. If you have a
menu entry "<Xtns"/Perl-Server> then it is probably installed.
The Perl-Server can either be started from the "<Xtns"> menu in Gimp, or automatically when a perl script can't find a running Perl-Server.
When started from within The Gimp, the Perl-Server will create a unix domain socket to which local clients can connect. If an authorization
password is given to the Perl-Server (by defining the environment variable "GIMP_HOST" before starting The Gimp), it will also listen on a
tcp port (default 10009). Since the password is transmitted in cleartext, using the Perl-Server over tcp effectively lowers the security of
your network to the level of telnet. Even worse: the current Gimp::Net-protocol can be used for denial of service attacks, i.e. crashing
the Perl-Server. There also *might* be buffer-overflows (although I do care a lot for these).
ENVIRONMENT
The environment variable "GIMP_HOST" specifies the default server to contact and/or the password to use. The syntax is [auth@][tcp/]host-
name[:port] for tcp, [auth@]unix/local/socket/path for unix and spawn/ for a private gimp instance. Examples are:
www.yahoo.com # just kidding ;)
yahoo.com:11100 # non-standard port
tcp/yahoo.com # make sure it uses tcp
authorize@tcp/yahoo.com:123 # full-fledged specification
unix/tmp/unx # use unix domain socket
password@unix/tmp/test # additionally use a password
authorize@ # specify authorization only
spawn/ # use a private gimp instance
spawn/nodata # pass --no-data switch
spawn/gui # don't pass -n switch
CALLBACKS
net()
is called after we have succesfully connected to the server. Do your dirty work in this function, or see Gimp::Fu for a better solu-
tion.
FUNCTIONS
server_quit()
sends the perl server a quit command.
get_connection()
return a connection id which uniquely identifies the current connection.
set_connection(conn_id)
set the connection to use on subsequent commands. "conn_id" is the connection id as returned by get_connection().
BUGS
(Ver 0.04) This module is much faster than it ought to be... Silly that I wondered wether I should implement it in perl or C, since perl is
soo fast.
AUTHOR
Marc Lehmann <pcg@goof.com>
SEE ALSO perl(1), Gimp.
perl v5.8.0 2001-12-06 Net(3)