RE: Cron jobs and perl

2003-08-20 Thread Vema Venkata
au1544s: /var/cron> ls -log total 3348 -rw--- 1 243691 Aug 21 14:48 log -rw--- 1 399268 Aug 21 00:01 log.0 -rw--- 1 451651 Aug 20 00:01 log.1 -rw--- 1 494912 Aug 19 00:01 log.2 -rw--- 1 75077 Apr 5 2002 log.3 when iam trying to view i dont have permissions --

RE: Cron jobs and perl

2003-08-20 Thread Anthony English
On AIX the file root is in /usr/spool/cron/crontabs which is linked to /var/spool/cron/crontabs. You could search for the cron files using find / -name cron* -print You might also be aware that there *MAY* be cron jobs for different users, e.g. in the cron directory there may be jobs which are run

RE: Cron jobs and perl

2003-08-20 Thread Vema Venkata
thanx for ur suggestion m8,i went to /var/cron but when iam trying to go to log it is saying the following error "ksh: log: not a directory" -Original Message- From: Schubert, John [NTWK SVCS] [mailto:[EMAIL PROTECTED] Sent: Thursday, 21 August 2003 4:01 AM To: Vema Venkata; Dan Muey

RE: Cron jobs and perl

2003-08-20 Thread Schubert, John [NTWK SVCS]
Anytime you have problems with a cron, the easiest place to look first is in the cronlog. If you have root access, look at the file /var/cron/log (this is Solaris, other *nix may have it elsewhere). If you don't have root access, delete my E-mail and I apoligize for intruding. :-) In the cron

Re: Executable perl program help!!

2003-08-20 Thread Rick Clary
You may also want to look at the PAR module. It can create and executable, and it is available from ActiveState via ppm. Be aware that it packages the interpreter and modules with the script, so the executable can be very large, particularly with Tk. Another project I have heard good things abou

Re: Reading columns from a file

2003-08-20 Thread zsdc
Shahzad A Khalid wrote: I want to read the column mentioning 481 and leaving Cell?= portion. Then second col. ie 13/12, third col, 5th(AFFX-KurIL2_at) and 7th(13/13). > Please suggest how do i do that. The code i tried is as follows: Try this: #!/usr/bin/perl -wlna print "@F[0..2,4,6]"; Usag

Re: Parse text file and increment

2003-08-20 Thread John W. Krahn
Rmck wrote: > > Hello, Hello, > I have a perl script that opens up a text file and displays the data fine. > My textfile: > > 111.111.111.1-25|DEPTA > 222.222.222.50-60|DEPTB > > What I would like to do is have it increment 1 through 25, and 50 through 60, > and display that like so: > > SO F

RE: create log as well as print on screen

2003-08-20 Thread Marcos . Rebelo
old_script.pl | perl -e "while (<>) {print $_; warn $_}" 2> $logFile Or redefine the print -Original Message- From: mark sony [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 3:11 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: create log as well as print on screen Hi

Re: Reading columns from a file

2003-08-20 Thread John W. Krahn
Shahzad A Khalid wrote: > > Hi, Hello, > I have a similar problem that someone just asked about reading specific > columns from a file and writing to another file. Eventually, I want to > read the written file to be loaded into Matlab. Im having trouble writing > the regular expression for this

RE: Sco Print

2003-08-20 Thread Bob Showalter
Paul Kraus wrote: > Is there a way using perl that I can send a text file to a sco > openserver print cue. On the server I would print the file using cat > filename.txt | lp -dP5 > > But the files are not on the server and I would like to automate the > process. There is a batch of reports that I

Re: Parse text file and increment

2003-08-20 Thread zsdc
rmck wrote: I have a perl script that opens up a text file and displays the data fine. My textfile: 111.111.111.1-25|DEPTA 222.222.222.50-60|DEPTB What I would like to do is have it increment 1 through 25, and 50 through > 60, and display that like so: Try something like this: #!/usr/bin

Re: Using hex.

2003-08-20 Thread zsdc
Rich Parker wrote: $loc = index($rec, $HexValue); OR @sub_field1 = split(/$HexValue/, $rec); Where the $HexValue is either a variable that contains my hex'01' or the absolute value itself. The chr function returns the character with a given ASCII (or Unicode) value and you can use \x01 inside o

Re: or or ||

2003-08-20 Thread zsdc
Bryan Harris wrote: I often have a line like this at the beginning of my scripts: @ARGV or die "Usage: blah\n"; ... but I've seen: @ARGV || die "Usage: blah\n"; Could someone explain the difference? The only difference (other than readability) between "or" and "||" operators (as well as "and

Parse text file and increment

2003-08-20 Thread rmck
Hello, I have a perl script that opens up a text file and displays the data fine. My textfile: 111.111.111.1-25|DEPTA 222.222.222.50-60|DEPTB What I would like to do is have it increment 1 through 25, and 50 through 60, and display that like so: SO FAR .. here is the data file hosts.d

Re: File sizes.

2003-08-20 Thread Rich Parker
On Tue, 19 Aug 2003 14:20:47 -0700, Rich Parker <[EMAIL PROTECTED]> wrote: Hi, I have been watching the thread about the file::copy. I ran into an issue in the Linux environment that brings a serious question, MAX file size. Keep in mind the serve

or or ||

2003-08-20 Thread Bryan Harris
I often have a line like this at the beginning of my scripts: @ARGV or die "Usage: blah\n"; ... but I've seen: @ARGV || die "Usage: blah\n"; Could someone explain the difference? - Bryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: File::Copy & CGI.pm

2003-08-20 Thread Yupapa.com
HiHi~ If you are transfering file from a local machine to a remote machine, you do not use File::Copy module to copy files. File::Copy is used for copying files locally. You can use Net::FTP to transfer files from one machine to another. And of course, you will need a FTP server for the machine

Reading columns from a file

2003-08-20 Thread Shahzad A Khalid
Hi, I have a similar problem that someone just asked about reading specific columns from a file and writing to another file. Eventually, I want to read the written file to be loaded into Matlab. Im having trouble writing the regular expression for this file. The format of the file looks like t

Perl & XS

2003-08-20 Thread Chuck Fox
Help! I have written a perl module that uses XS to reach out to a password database and retrieve a password for eventual use in DBI. My problem is Linux related. I have compiled and tested this code on HP and Sun and it works just fine there. However on my RedHat AS2.1 box, the code refuses

Re: Multiple Inheritance.

2003-08-20 Thread James Edward Gray II
On Wednesday, August 20, 2003, at 04:30 PM, Erich Musick wrote: I'm having trouble doing multiple inheritance...I want to inherit not only the subroutines from two classes, but also the instance variables. how do i do this? Methods are the easy part: our @ISA = qw(ClassOne ClassTwo Etc); Perl

Multiple Inheritance.

2003-08-20 Thread Erich Musick
I'm having trouble doing multiple inheritance...I want to inherit not only the subroutines from two classes, but also the instance variables. how do i do this? Thanks in advance -- Erich Musick http://erichmusick.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

RE: the File::Copy module

2003-08-20 Thread David Wall
--On Wednesday, August 20, 2003 8:01 AM -0700 Jeff Westman <[EMAIL PROTECTED]> wrote: As for qhat 'qq' does, it behaves like double quotes. As you pointed out, it CAN make your code harder to read (!) sincemany people are not accustomed to it. For me, '"' is more customary (with C/C++ or shell)

Re: Using hex.

2003-08-20 Thread John W. Krahn
Rich Parker wrote: > > Howdy, Hello, > I use many different languages here at work, from Assembly, Rexx, to > other mainframe languages. One thing I find it difficult to do with Perl > is the handling of Hex characters. This may seem like a very generalized > question, forgive me for trying to f

Re: File sizes.

2003-08-20 Thread Rich Parker
Hi, I have been watching the thread about the file::copy. I ran into an issue in the Linux environment that brings a serious question, MAX file size. Keep in mind the server is running 7.0 RH, we have 7.2 Enterprise Server also, and we pay for support. But even the RH support says they can't handle

Using hex.

2003-08-20 Thread Rich Parker
Howdy, I use many different languages here at work, from Assembly, Rexx, to other mainframe languages. One thing I find it difficult to do with Perl is the handling of Hex characters. This may seem like a very generalized question, forgive me for trying to find a "Better way to do it". Picture

Re: writing back to a file

2003-08-20 Thread Gabriel Cooper
try this: my $source_file = "searchandreplace.txt"; open(IN,"<$source_file") || die "can't open file: $1"; while() { $row = $_; $row =~ s/\s+\w+//i; push(@arr, $row); } close(IN); open(OUT,">$source_file" ) || die "can't open file: $1"; foreach (@arr) { print O

RE: writing back to a file

2003-08-20 Thread Darbesio Eugenio
AN wrote: >>>Hi, >>>Newbie here. I am writing a program that takes a file that has two columns >>>of words, extracts the second column, then saves the original file with only >>>the data in the first column. >>>Question #1 - would it be better to do this w/ the split or s/// functions ? >>>Ques

Re: File sizes.

2003-08-20 Thread david
Rich Parker wrote: > Hi, > I have been watching the thread about the file::copy. I ran into an > issue in the Linux environment that brings a serious question, MAX file > size. Keep in mind the server is running 7.0 RH, we have 7.2 Enterprise > Server also, and we pay for support. But even the RH

Spreadsheet::WriteExcel formulas

2003-08-20 Thread Olivier6
Hello, I use the module Spreadsheet::WriteExcel and have following effect by generating formulas ... # Formulas my $formel = $worksheet -> store_formula('=IF(A2=A1,"X","-");'); for my $row (1..$anz_rows) { $worksheet -> repeat_formula($row, 8, $formel, $f_standard, 'A2', 'A'.($row + 1), '

RE: Sco Print

2003-08-20 Thread Paul Kraus
The script is not going to be run from the sco server. :) That's my problem if I could run the script there this wouldn't be an issue. -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 1:38 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE:

RE: Sco Print

2003-08-20 Thread Paul Kraus
PERFECT!!! Thanks! -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 2:10 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Sco Print > The script is not going to be run from the sco server. :) > That's my problem if I could run the sc

Re: create log as well as print on screen

2003-08-20 Thread Jenda Krynicky
From: "mark sony" <[EMAIL PROTECTED]> > I wrote a script which is running perfectly fine providing > many outputs on the screen . Only glitch is that it does not print in > a log file . Now what I want is that it would print on the screen as > well as create a log file . At the end of the pro

RE: Sco Print

2003-08-20 Thread Dan Muey
> The script is not going to be run from the sco server. :) > That's my problem if I could run the script there this > wouldn't be an issue. Ohh - Well then give Net::Telnet $tnet->cmd("echo $fileguts | /bin/lp -dP5"); or somehtign like that Net::Ssh::Perl Net::FTP a look HTH Dmuey >

Re: writing back to a file

2003-08-20 Thread John W. Krahn
Absolut Newbie wrote: > > Hi, Hello, > Newbie here. I am writing a program that takes a file that has two columns > of words, extracts the second column, then saves the original file with only > the data in the first column. > > Question #1 - would it be better to do this w/ the split or s/// f

RE: Sco Print

2003-08-20 Thread Dan Muey
> Is there a way using perl that I can send a text file to a > sco openserver print cue. On the server I would print the > file using cat filename.txt | lp -dP5 Howdy, Get file contents from db into a variable I'd say open a pipe to lp -dP5 (Use the actual path to avoid headaches) The write the

Re: Array to hash with reverse split?

2003-08-20 Thread John W. Krahn
Linux Rocks wrote: > > John> Perl has the tools to do most of that without running an external > John> program like 'ls' or 'grep'. > > Yes, thank you, I know. I will be dealing with data that is arranged SIMILAR > TO THE OUPUT OF ls -l, NOT THE ACTUAL OUTPUT OF THAT COMMAND and it will have > N

Sco Print

2003-08-20 Thread Paul Kraus
Is there a way using perl that I can send a text file to a sco openserver print cue. On the server I would print the file using cat filename.txt | lp -dP5 But the files are not on the server and I would like to automate the process. There is a batch of reports that I have to print each month. I w

Re: Executable perl program help!!

2003-08-20 Thread Rich Parker
[EMAIL PROTECTED] wrote: Also try http://www.indigostar.com/ Laurent coudeur Quick question about this, sounds great. But if I were running my Perl from an http call (Normal browser usage), what would the "exec cgi" call "Look like", syntax wise?? Thanks. Bob Showalter <[EMAIL PROTECT

RE: the File::Copy module

2003-08-20 Thread Jeff Westman
--- Saadat Saeed <[EMAIL PROTECTED]> wrote: > Hello, > > Thanks for all your inputs now below you mentioned > > copy(qq(\\machine1\share\$file),qq(\\mahine2\share\$file)) > > sorry for my ignorance but what is qq In perl, there are many things to do things "right". That is the beauty of p

RE: Executable perl program help!!

2003-08-20 Thread Dan Muey
> > How can i generate such a file? # vi mysript.pl : #!/usr/bin/perl -w use strict; print "hello\n"; # ./myscript.pl Bash: Bad command or file name : Permission denied # chmod 755 myscript.pl # ./myscript.pl hello # On unix it has to be executable by the user running it, commonly 755 or o

RE: Executable perl program help!!

2003-08-20 Thread Laurent_Coudeur
Also try http://www.indigostar.com/ Laurent coudeur Bob Showalter <[EMAIL PROTECTED]> 20/08/2003 16:20 To: "'Rich Parker'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] cc: Subject:RE: Executable perl program help!! Rich Parker wrote: > I was at Active Sta

RE: multiple regex in if() staetment

2003-08-20 Thread Dan Muey
Thanks for the pointers! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: File sizes.

2003-08-20 Thread wiggins
On Tue, 19 Aug 2003 14:20:47 -0700, Rich Parker <[EMAIL PROTECTED]> wrote: > Hi, > I have been watching the thread about the file::copy. I ran into an > issue in the Linux environment that brings a serious question, MAX file > size. Keep in mind t

RE: Executable perl program help!!

2003-08-20 Thread Bob Showalter
Rich Parker wrote: > I was at Active State the other day, they have one that can be > purchased. I have seen a few others when I did a similar search as > mentioned. I haven't seen one for free or one that has a demo for it, > I'd love to try one, if anyone sees one, let everyone know about it. Yo

Re: Executable perl program help!!

2003-08-20 Thread Rich Parker
I was at Active State the other day, they have one that can be purchased. I have seen a few others when I did a similar search as mentioned. I haven't seen one for free or one that has a demo for it, I'd love to try one, if anyone sees one, let everyone know about it. Thanks. Ramprasad A Padma

Re: Executable perl program help!!

2003-08-20 Thread Ramprasad A Padmanabhan
[EMAIL PROTECTED] wrote: How can i generate such a file? Million dollar question , No perfect answer. Depends on what OS you are using. Do a google on perl2exe For starters try the O.pm. To convert your perlcode to C and then compile the C code On linux You can compile using export LDOPTS=`per

create log as well as print on screen

2003-08-20 Thread mark sony
Hi All, I wrote a script which is running perfectly fine providing many outputs on the screen . Only glitch is that it does not print in a log file . Now what I want is that it would print on the screen as well as create a log file . At the end of the program I will output that the above o

Re: Array to hash with reverse split?

2003-08-20 Thread linux . rocks
[SNIP] John> #/usr/local/bin -w John> ^^ John>I see no 'perl' there. Typo. [SNIP] John> my (@ARRAY, %TEST, $FILTER) = ""; John> John> Why are you assigning "" to the first element of @ARRAY? 'Cause I'm an idiot... [SNIP] John> Perl has the tools to do most of that without runnin

Executable perl program help!!

2003-08-20 Thread sc00170
How can i generate such a file? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: writing back to a file

2003-08-20 Thread James Edward Gray II
On Wednesday, August 20, 2003, at 08:12 AM, Absolut Newbie wrote: Hi, Howdy. Newbie here. I am writing a program that takes a file that has two columns of words, extracts the second column, then saves the original file with only the data in the first column. Question #1 - would it be better t

Re: multiple regex in if() staetment

2003-08-20 Thread James Edward Gray II
On Tuesday, August 19, 2003, at 05:54 PM, Dan Muey wrote: I'm trying to figure out the best way to test a string agains a list of regexs like so: my @regex = qw(qr(joe$) qr(^mama) qr([abc])); I see you already got your grep() answer, but... There's definitely no reason to use that qw() operato

writing back to a file

2003-08-20 Thread Absolut Newbie
Hi, Newbie here. I am writing a program that takes a file that has two columns of words, extracts the second column, then saves the original file with only the data in the first column. Question #1 - would it be better to do this w/ the split or s/// functions ? Question #1 - how do I write back

Re: the File::Copy module

2003-08-20 Thread James Edward Gray II
On Wednesday, August 20, 2003, at 01:45 AM, Trina Espinoza wrote: I only know the first part. qq is double quotes. As opposed to the qw which is single quotes. Close. qq() is double quotes, you got that right. q() is single quotes. qw() is the "Quote Words" operator. It turns this: qw(some

Re: I need help using %Hashes

2003-08-20 Thread cowboy
"Horace Franklin Jr." <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D :[EMAIL PROTECTED] Help! I need help using %hashes to receive input from the form below. What changes would I make to the syntax of the commented lines below to do this?. my $form =

Re: access mdb file from perl.....,.

2003-08-20 Thread rjamestaylor
Quoting cowboy <[EMAIL PROTECTED]>: > Hello all, > > I have a mdb file(ms access) on linux server. > Is there any method to access this mdb file from perl? > Here's a good summation post and follow-up on London Perl Mongers list: http://kochi.etla.org/london.pm/html/2002/07/msg00068.html Basic

mdb file

2003-08-20 Thread cowboy
Hello all, I have a mdb file(ms access) on linux server. Is there any method to access this mdb file from perl? Thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

access mdb file from perl.....,.

2003-08-20 Thread cowboy
Hello all, I have a mdb file(ms access) on linux server. Is there any method to access this mdb file from perl? Thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: the File::Copy module

2003-08-20 Thread Trina Espinoza
I only know the first part. qq is double quotes. As opposed to the qw which is single quotes. Good for interpolating! -T - Original Message - From: "Saadat Saeed" <[EMAIL PROTECTED]> To: "Dan Muey" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, August 19, 2003 11:07 PM Subjec