Re: Perl script: where was I executed from?

2020-11-22 Thread Vlado Keselj
Hi, I am not sure that I completely understand your question (for example, what does it mean to run a script "dynamically or not"). You could retrieve the list of processes from OS to try to figure out how was the script ran, but it is a bit messy. Just maybe: maybe you want to see whether the

Re: Perl script: where was I executed from?

2020-11-21 Thread Uri Guttman
On 11/22/20 12:33 AM, wagsworl...@yahoo.com wrote: The only problem I was trying to determine was could i know if I was running from BBEdit dynamically or not? That was the question. No problem, just could I know what environment I was running in. The output was a the Unix output log which up

Re: Perl script: where was I executed from?

2020-11-21 Thread wagsworld48 via beginners
The only problem I was trying to determine was could i know if I was running from BBEdit dynamically or not? That was the question. No problem, just could I know what environment I was running in. The output was a the Unix output log which up to the last update automatically came to the front

Re: Perl script: where was I executed from?

2020-11-21 Thread Uri Guttman
On 11/21/20 10:32 PM, wagsworl...@yahoo.com wrote: Well, up until this last update is BBEdit, when a script was run while in BBEdit, the Unix log file would automatically come to the fore front. Now it stays hidden. that doesn't sound like a perl problem. what log file? there are many on a

Re: Perl script: where was I executed from?

2020-11-21 Thread wagsworld48 via beginners
Well, up until this last update is BBEdit, when a script was run while in BBEdit, the Unix log file would automatically come to the fore front. Now it stays hidden. A gentleman on the BBEdit mail list gave an   osasctipt that one can execute from within the script bring executed. But sometimes

Re: Perl script: where was I executed from?

2020-11-21 Thread Uri Guttman
On 11/21/20 7:42 PM, wagsworld48 via beginners wrote: It was a good idea, but that gives me zsh which is what in this case BBEdit uses to execute the script. So with your code of $ENV, then I looked at the variables within ENV and picked one that was there for BBEdit and not there in a normal

Re: Perl script: where was I executed from?

2020-11-21 Thread wagsworld48 via beginners
It was a good idea, but that gives me zsh which is what in this case BBEdit uses to execute the script. So with your code of $ENV, then I looked at the variables within ENV and picked one that was there for BBEdit and not there in a normal terminal run. Know other ways, but this at least is one

Re: Perl script: where was I executed from?

2020-11-21 Thread sisyphus
Perhaps: perl -le 'print $ENV{SHELL}' Cheers, Rob On Sun, Nov 22, 2020 at 8:00 AM wagsworld48 via beginners < beginners@perl.org> wrote: > Mind is blank, but want to know if started with say BBEdit or bash or ? > > Probably very simple, but at this point, no idea... ;) > > WagsWorld > World of

Perl script: where was I executed from?

2020-11-21 Thread wagsworld48 via beginners
Mind is blank, but want to know if started with say BBEdit or bash or ? Probably very simple, but at this point, no idea... ;) WagsWorld World of Perl Hebrews 4:15 Ph D:(408)914-1341 Ph M:(408)761-7391

Re: question about perl script

2019-10-30 Thread John W. Krahn
On 2019-10-29 7:48 p.m., 刘东 wrote: Dear every one: Hello. I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file

Re: question about perl script

2019-10-30 Thread Rob Coops
hat might want to understand what you are doing or how you are doing that even though you are no longer there to ask those questions (or after a few years you no longer remember) Regards, Rob On Wed, Oct 30, 2019 at 7:04 AM Uri Guttman wrote: > On 10/29/19 10:48 PM, 刘东 wrote: > > Dear eve

Re: question about perl script

2019-10-30 Thread Uri Guttman
On 10/29/19 10:48 PM, 刘东 wrote: Dear every one: I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file

question about perl script

2019-10-29 Thread 刘东
Dear every one: I try to write a perl script to delet the content of file carp01_1_both.txt as same as from another file carp-carp01_TKD181002053-1_1_sg.txt, so to get a new file from file carp-carp01_TKD181002053-1_1_sg.txt but excluding file carp01_1_both.txt. However, when I run this scrip

perl script problem

2019-10-13 Thread 刘东
Dear every one, I have written a perl script to get seprated files, but finally I every file included multiple files appeared before, for example, 1 file 2M, 2 file 5 M( included last one), 3 file 6 M (included last two ones), ... but I expected as 1 file 2M, 2 file 3M, 3 file 1 M

Re: perl script with wrong

2019-10-13 Thread Jim Gibson
> On Oct 10, 2019, at 6:04 PM, 刘东 wrote: > > Dear friends, > I have written a perl script to get seprated files, but finally I every file > included multiple files appeared before, > for example, 1 file 2M, 2 file 5 M( included last one), 3 file 6 M (included > last t

perl script with wrong

2019-10-13 Thread 刘东
Dear friends, I have written a perl script to get seprated files, but finally I every file included multiple files appeared before, for example, 1 file 2M, 2 file 5 M( included last one), 3 file 6 M (included last two ones), ... but I expected as 1 file 2M, 2 file 3M, 3 file 1 M, ... the script

Re: perl script question

2019-10-10 Thread John W. Krahn
On 2019-10-09 7:21 p.m., 刘东 wrote: hellow: I have written a script, but it does not work, can you tell me what wrong with me? #! /usr/bin/perl use strict; use warnings; use Getopt::Long; my ($dir, $files, $file_name, $file_format, $file_dir, $file_main); GetOptions ('dr=s' =>\$dir); open

Re: perl script question

2019-10-10 Thread John W. Krahn
On 2019-10-09 7:21 p.m., 刘东 wrote: hellow: I have written a script, but it does not work, can you tell me what wrong with me? #! /usr/bin/perl use strict; use warnings; use Getopt::Long; my ($dir, $files, $file_name, $file_format, $file_dir, $file_main); GetOptions ('dr=s' =>\$dir); open

Re: perl script question

2019-10-10 Thread Ken Slater
In addition to the comments made by David, it appears the line: open FASEQ, "<", $files or die "can not read open $!"; is not needed. The file handle FASEQ is never used in an input operation. You want to use the file name as noted by David. Ken On Thu, Oct 10, 2019 at 4:06 AM 刘东 wrote: >

Re: perl script question

2019-10-10 Thread David Precious
The error message "FASEQ can not open" doesn't look like something which could be output by the code you've provided. *Either* you should get the "can not read open $!" message (where the $! will be interpolated to the reason it failed), or the message is coming from whatever the "usearch" tool

perl script question

2019-10-10 Thread 刘东
hellow: I have written a script, but it does not work, can you tell me what wrong with me? #! /usr/bin/perl use strict; use warnings; use Getopt::Long; my ($dir, $files, $file_name, $file_format, $file_dir, $file_main); GetOptions ('dr=s' =>\$dir); open INF,"<",'sine.fa' or die "can't read

Re: How to get a called perl script to write output to a file with DIFFERENT user:group than the calling app?

2017-01-16 Thread Chris Fedde
es the file it will have group "othergroup". Usually this is sufficient. Of course this assumes linux and other things sufficiently unix like. On Sun, Jan 15, 2017 at 3:45 PM, <al...@myfastmail.com> wrote: > I have an application that calls a perl script, feeding it input over > ST

Re: How to get a called perl script to write output to a file with DIFFERENT user:group than the calling app?

2017-01-15 Thread Chas. Owens
snip > So I guess the question is - > > - is there a way in perl to authorize the callED perl script to have > higher perms than the callING app's, so that it can write to the file I'm > targeting? > > Or do I have to to this OUTSIDE of the perl script? > The short a

Re: How to get a called perl script to write output to a file with DIFFERENT user:group than the calling app?

2017-01-15 Thread alanj
id testapp uid=12345(testapp) gid=12345(testapp) groups=12345(testapp) grep testapp /etc/group testapp:x:12345: the changes don't get made; the target file is untouched. So I guess the question is - - is there a way in perl to authorize the callED perl script

Re: How to get a called perl script to write output to a file with DIFFERENT user:group than the calling app?

2017-01-15 Thread Rob Dixon
nd group. Thanks. Rob Dixon On 15 January 2017 22:45:43 GMT+00:00, al...@myfastmail.com wrote: >I have an application that calls a perl script, feeding it input over >STDIN. > >The perl script takes that input, processes it, and writes is as a >change to an output file. > &

How to get a called perl script to write output to a file with DIFFERENT user:group than the calling app?

2017-01-15 Thread alanj
I have an application that calls a perl script, feeding it input over STDIN. The perl script takes that input, processes it, and writes is as a change to an output file. I use Path::Tiny, and this works ok, use Path::Tiny qw(path); my $newdata = $@; $newdata = (some

Re: perl script with errors?

2015-11-26 Thread Shlomi Fish
Hi Jin, some comments on your code: On Thu, 26 Nov 2015 08:13:54 +0800 Jin Xu wrote: > Try to use below updated ones: > > #!/usr/bin/perl > use strict; > use warnings; > while (my $line = <>) { You're lacking many empty lines - separating the code into paragraphs. See:

Re: perl script with errors?

2015-11-26 Thread Shlomi Fish
Hi Miguel, On Wed, 25 Nov 2015 20:28:48 -0500 Miguel Rodas wrote: > Why am I in this thread? > > Please remove me from it > You are likely subscribed to beginners@perl.org and so receive all E-mails from all threads. For how to unsubscribe, see

Re: perl script with errors?

2015-11-25 Thread Rui Fernandes
Hi Gary, I don't know what you are trying to do with that code... :( Still, it's valid this way: #!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; #Only if you want this format while (my $line = <>) { while ($line =~ s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d+)*##) {

Re: perl script with errors?

2015-11-25 Thread Olivier Le Monnier
> gb@MINT ~/Perl5/perl programs $ cat prog164.pl > #!/usr/bin/perl > use strict; > use warnings; > while ($line = <>) { > while ($line =~ > s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d+)*##) { > eval ("\$result = $&;"); > $line =~ s//$result/; > > } > print ($line); > }

Re: perl script with errors?

2015-11-25 Thread Jin Xu
Try to use below updated ones: #!/usr/bin/perl use strict; use warnings; while (my $line = <>) { while ($line =~ s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d+)*##) { my $result; eval ("$result = $&;"); $line =~ s//$result/; } print ($line); } Regards, Jin Xu

Re: perl script with errors?

2015-11-25 Thread Miguel Rodas
Why am I in this thread? Please remove me from it Sent from my iPhone > On Nov 25, 2015, at 7:13 PM, Jin Xu wrote: > > Try to use below updated ones: > > #!/usr/bin/perl > use strict; > use warnings; > while (my $line = <>) { > while ($line =~ >

perl script with errors?

2015-11-25 Thread Gary Baker
gb@MINT ~/Perl5/perl programs $ cat prog164.pl #!/usr/bin/perl use strict; use warnings; while ($line = <>) { while ($line =~ s#\d+\s*[*+-/]\s*\d+(\s*[*+-/]\s*\d+)*##) { eval ("\$result = $&;"); $line =~ s//$result/; } print ($line); } gb@MINT ~/Perl5/perl

Posting to WordPress from a Perl script?

2013-07-19 Thread Octavian Rasnita
Hi, Do you know if there is a working module that can be used to post to WordPress from a Perl script? I've seen that all the modules that contain WordPress are very old. I need to install that module under a Perl built with Perlbrew. I tried to install WordPress, WordPress::API, but they both

Re: Posting to WordPress from a Perl script?

2013-07-19 Thread jbiskofski
links, fill out forms and submit. - Jose On Fri, Jul 19, 2013 at 6:15 AM, Octavian Rasnita orasn...@gmail.comwrote: Hi, Do you know if there is a working module that can be used to post to WordPress from a Perl script? I've seen that all the modules that contain WordPress are very old. I

Re: Posting to WordPress from a Perl script?

2013-07-19 Thread jbiskofski
at 6:15 AM, Octavian Rasnita orasn...@gmail.comwrote: Hi, Do you know if there is a working module that can be used to post to WordPress from a Perl script? I've seen that all the modules that contain WordPress are very old. I need to install that module under a Perl built with Perlbrew. I

Re: Posting to WordPress from a Perl script?

2013-07-19 Thread Octavian Rasnita
From: jbiskofski Also, to fix the expat error you need to install libxml development libraries, depending on your distro this can be accomplished in different ways. Thanks. Finally I was able to install WordPress module and WordPress::API, but it was pretty hard. Octavian

Re: the perl script (SOLVED: sha-2 sum of files?)

2013-06-14 Thread Jim Gibson
On Jun 13, 2013, at 10:57 PM, lee wrote: Hi, so I've done this script now --- my fourth perl script ever --- and since I'm getting so much help here, I thought I'd post it here. I'm sure it could be done much better, it's just plain and simple. It has one problem: The list of closed

Re: the perl script (SOLVED: sha-2 sum of files?)

2013-06-14 Thread lee
Jim Gibson jimsgib...@gmail.com writes: Some comments on your code: 1. Rather than doing this: while ( $curridx) { chomp $_; my $current_file = $_; you should do this: while ( my $current_file = $curridx ) { chomp($current_file); Ah cool :) I really didn't like the way I did that,

the perl script (SOLVED: sha-2 sum of files?)

2013-06-13 Thread lee
Hi, so I've done this script now --- my fourth perl script ever --- and since I'm getting so much help here, I thought I'd post it here. I'm sure it could be done much better, it's just plain and simple. It has one problem: The list of closed files can grow indefinitely, and since the script

Re: Perl Script for parsing log files.

2013-05-08 Thread Asad
Hi All , Thanks to you all for the inputs . I have created the following script : use warnings; use strict; use File::Slurp qw(read_file); use constant LIMIT = 3;## Number of lines wanted use constant UPPERLIMIT = 9; open (OUTFILE, '','d:\perl\OUTPUT.TXT'); #my $file = $ARGV[0];

Re: Perl Script for parsing log files.

2013-05-08 Thread Ed Davis
Hi My first contribution to the list! Probably the simplest way to do this is (once you have apache2 installed and working) to create a script that looks a bit like this: !#/usr/bin/perl use strict; use warnings; sub mylogparser { Your script } mylogparser (); print Content-type:

Re: Perl Script for parsing log files.

2013-05-08 Thread Shlomi Fish
Hi Asad, some comments on your script: On Wed, 8 May 2013 11:34:14 +0530 Asad asad.hasan2...@gmail.com wrote: Hi All , Thanks to you all for the inputs . I have created the following script : use warnings; use strict; use File::Slurp qw(read_file); use constant LIMIT = 3;

Re: Perl Script for parsing log files.

2013-04-14 Thread timothy adigun
Hi, On Sat, Apr 13, 2013 at 4:50 PM, Asad asad.hasan2...@gmail.com wrote: Hi All , Greetings ! I have completed O'Reily first book Learning Perl . Started writing small perl programs . However I basically do log file analysis , hence was thinking is there any perl code

Perl Script for parsing log files.

2013-04-13 Thread Asad
Hi All , Greetings ! I have completed O'Reily first book Learning Perl . Started writing small perl programs . However I basically do log file analysis , hence was thinking is there any perl code around in any of the book or if anyone already developed for the following

Re: Perl Script for parsing log files.

2013-04-13 Thread David Precious
On Sat, 13 Apr 2013 21:20:30 +0530 Asad asad.hasan2...@gmail.com wrote: I have completed O'Reily first book Learning Perl . Started writing small perl programs . However I basically do log file analysis , hence was thinking is there any perl code around in any of the book or if anyone

Re: Dynamically created perl script

2013-03-19 Thread Brock
,' a solution that behaves like the source code for the Perl script was piped in instead of being opened from a file. This is a Linux system and the solution doesn't need to be portable to Windows. It sounds like what you're doing is working, so more power to you. But just in the way of slightly

Re: Dynamically created perl script

2013-03-19 Thread Brandon McCaig
On Tue, Mar 19, 2013 at 12:21:10AM -0300, Brian Fraser wrote: You can just pipe a program into perl and it'll DWIM: $ echo 'print Hello World, Perl $^V\n' | perl You can also be more explict about the program being on STDIN: bash$ echo 'print Hello , World!\n' | perl - The - tells it to

Dynamically created perl script

2013-03-18 Thread Ronald Weidner
for the Perl script was piped in instead of being opened from a file. This is a Linux system and the solution doesn't need to be portable to Windows. Has this been done? Any ideas or examples?

Re: Dynamically created perl script

2013-03-18 Thread Brian Fraser
code file. In other words,' a solution that behaves like the source code for the Perl script was piped in instead of being opened from a file. This is a Linux system and the solution doesn't need to be portable to Windows. Has this been done? Any ideas or examples? You can just pipe

Re: problem about run perl script in java

2013-02-26 Thread Luca Ferrari
AM, yunbin wang accept...@gmail.com wrote: Now , I want run perl script in java, but I can't install perl on the machine, only I can copy the perl files(those installed on other machine) to that machine. so how can I initial perl INC in java that I can run perl in my java program? -- Best

Re: problem about run perl script in java

2013-02-26 Thread Dr.Ruud
On 2013-02-26 08:48, yunbin wang wrote: Now , I want run perl script in java, but I can't install perl on the machine, only I can copy the perl files(those installed on other machine) to that machine. so how can I initial perl INC in java that I can run perl in my java program? Can you run

problem about run perl script in java

2013-02-25 Thread yunbin wang
Now , I want run perl script in java, but I can't install perl on the machine, only I can copy the perl files(those installed on other machine) to that machine. so how can I initial perl INC in java that I can run perl in my java program? -- Best Regards ! -- To unsubscribe, e-mail: beginners

Re: problem about run perl script in java

2013-02-25 Thread Mike Dunaway
On 2/26/13 1:48 AM, yunbin wang wrote: Now , I want run perl script in java, but I can't install perl on the machine, only I can copy the perl files(those installed on other machine) to that machine. so how can I initial perl INC in java that I can run perl in my java program? This is a Perl

Re: Tutorial for a menu driven perl script

2012-12-21 Thread David Precious
On Fri, 21 Dec 2012 13:42:18 +1300 newbie01 perl newbie01.p...@gmail.com wrote: Hi, Does anyone know of any great source/link for tutorials on menu driven Perl? Menu driven? You may need to be more specific. Perhaps you mean terminal-based, using e.g. curses-based stuff? Perhaps one of

Re: Tutorial for a menu driven perl script

2012-12-21 Thread Tony Esposito
: Tutorial for a menu driven perl script Hi, Does anyone know of any great source/link for tutorials on menu driven Perl? Thanks in advance.

Tutorial for a menu driven perl script

2012-12-20 Thread newbie01 perl
Hi, Does anyone know of any great source/link for tutorials on menu driven Perl? Thanks in advance.

Re: Perl script on a server using Win32::OLE

2012-10-03 Thread Natxo Asenjo
On Wed, Sep 26, 2012 at 8:23 AM, Jason Feng q15...@hotmail.com wrote: Hello, I have a Perl script running on a Windows 2008 server which uses Win32::OLE to dump the results on Excel files. It is working fine when I remote login to the server and run the script. Now I want to write a Perl

RE: Perl script on a server using Win32::OLE

2012-10-03 Thread Jason Feng
Thanks. F: is the local drive on the server. Now I schedule the script to be run on a daily base instead of calling from my local machine. So far it is OK. Thanks anyway. Cheers, Jason Date: Wed, 3 Oct 2012 19:34:45 +0200 Subject: Re: Perl script on a server using Win32::OLE From

Perl script on a server using Win32::OLE

2012-09-26 Thread Jason Feng
Hello, I have a Perl script running on a Windows 2008 server which uses Win32::OLE to dump the results on Excel files. It is working fine when I remote login to the server and run the script. Now I want to write a Perl script on my local machine using Net::Telnet to remote run the script

Re: Clarification re Perl Script out of control

2012-09-14 Thread David Precious
On Thu, 13 Sep 2012 22:56:18 -0700 (PDT) jmrhide-p...@yahoo.com wrote: Where I think we need to focus is, assuming the script runs to its end every time, why doesn't it release its hold on the server resources? My hosting service runs Apache version 2.2.22. I can't tell what version of Perl

Re: Clarification re Perl Script out of control

2012-09-14 Thread Paul Anderson
On 2012-09-14, at 1:56 AM, jmrhide-p...@yahoo.com wrote: I can see from the responses so far that I was unclear in the way I phrased my question, so please let me emphasize the following: MY SCRIPT, THOUGH COMPLEX (500 LINES), PRODUCES EXACTLY THE OUTPUT I EXPECT EVERY TIME I RUN IT. In

Clarification re Perl Script out of control

2012-09-13 Thread jmrhide-perl
I can see from the responses so far that I was unclear in the way I phrased my question, so please let me emphasize the following: MY SCRIPT, THOUGH COMPLEX (500 LINES), PRODUCES EXACTLY THE OUTPUT I EXPECT EVERY TIME I RUN IT. In particular, it never hangs or gives a wrong answer. Also, with

Can not run ssh command inside perl script !

2012-08-31 Thread Jack Vo
Hello List, I'm trying to execute a script which retrieves swap usage memory in remote host. So that I install Net::SSH::Perl module (from source code) from CPAN website. My script below : #!/usr/bin/perl -w use strict; use Net::SSH::Perl; my $hostname = 192.168.7.5; my $username = abcd; my

Re: Can not run ssh command inside perl script !

2012-08-31 Thread Shlomi Fish
Hello Jack, On Fri, 31 Aug 2012 17:00:12 +0700 Jack Vo jacksvo2...@gmail.com wrote: Hello List, I'm trying to execute a script which retrieves swap usage memory in remote host. So that I install Net::SSH::Perl module (from source code) from CPAN website. My script below :

Slightly OT: POST data to perl script

2012-07-24 Thread Mark Haney
This is slightly OT, but I'm kinda under a dead line and am hoping someone takes pity on me and supplies an answer. I have a small webserver that takes data from a custom chip and sends it via a POST to a perl script on our primary webserver. The data is sent like TIME=XXTOWER= where

Re: Slightly OT: POST data to perl script

2012-07-24 Thread Shawn H Corey
On Tue, 24 Jul 2012 11:53:33 -0400 Mark Haney ma...@abemblem.com wrote: The problem I'm seeing in tcpdump is that it appears that the first two integers are being dropped if they are both zeroes. You could reconstruct the leading zeros in your Perl script. for my $n ( 0 .. 10 ){ my $m

Re: Slightly OT: POST data to perl script

2012-07-24 Thread Mark Haney
Perl script. for my $n ( 0 .. 10 ){ my $m = sprintf( '%04d', $n ); print $n == $m\n; } Yeah, it certainly looks like I'll have to for now anyway. I don't really have time to tinker with the other end until after the meeting with the bosses tomorrow. Thanks for the suggestions

Perl script logging permissions

2012-05-26 Thread Kwaku Addo Ofori
Hi Guys, I need some help. I've just finished my script and a manual test is fine. Basically, it's a script that gets the PID of some selected process and lists all the open file descriptors for the processes pipes this to a file. Problem is, when I run the script manually it works well and

Re: Perl script logging permissions

2012-05-26 Thread David Christensen
On 05/26/2012 12:33 PM, Kwaku Addo Ofori wrote: I need some help. I've just finished my script and a manual test is fine. Basically, it's a script that gets the PID of some selected process and lists all the open file descriptors for the processes pipes this to a file. Problem is, when I run the

how to display commands while perl script executing

2012-05-15 Thread Sunita.Pradhan
Hi I want to print the command during script execution . Example : === $ls = `ls`; Print $ls\n; == In the above script I want to print ls command before 'ls' command gets executed . Like set -x does in shell scripts . Could you please help

Re: how to display commands while perl script executing

2012-05-15 Thread CloudWebDNS.com
Hello, Try this: $ perl -le '$c=ls -l;print $c;system $c' ls -l total 16 drwxr-xr-x 4 pyh pyh 4096 2012-05-12 17:08 backup drwxr-xr-x 2 pyh pyh 4096 2012-05-13 08:29 bin drwxr-xr-x 5 pyh pyh 4096 2012-05-03 11:03 ipdata drwxr-xr-x 4 pyh pyh 4096 2012-05-14 10:34 tmp Hi I

RE: how to display commands while perl script executing

2012-05-15 Thread Sunita.Pradhan
It is working for one line program . How can we implement in a script ? -Sunita -Original Message- From: CloudWebDNS.com [mailto:supp...@cloudwebdns.com] Sent: Tuesday, May 15, 2012 5:27 PM To: beginners@perl.org Subject: Re: how to display commands while perl script executing Hello

Re: how to display commands while perl script executing

2012-05-15 Thread Shlomi Fish
Hi Sunita, On Tue, 15 May 2012 07:40:44 -0400 sunita.prad...@emc.com wrote: Hi I want to print the command during script execution . Example : === $ls = `ls`; Print $ls\n; == I should note that trapping the output of ls is pretty

Re: how to display commands while perl script executing

2012-05-15 Thread Michael Rasmussen
On Tue, May 15, 2012 at 07:40:44AM -0400, sunita.prad...@emc.com wrote: Hi I want to print the command during script execution . Example : === $ls = `ls`; Print $ls\n; == A straightforward way to do this is to run your script with the

RE: how to display commands while perl script executing

2012-05-15 Thread Bob McConnell
scripts . Could you please help me on this ? Are you looking for a Perl script, or just a shell script? Using Perl for this appears to be like using a baseball bat to swat a fly. But here in a Perl mailing list, you are going to get Perl scripts. If that is not what you are looking for, you

Re: how to display commands while perl script executing

2012-05-15 Thread Torqued
. Are you looking for a Perl script, or just a shell script? Using Perl for this appears to be like using a baseball bat to swat a fly. But here in a Perl mailing list, you are going to get Perl scripts. If that is not what you are looking for, you need to find a mailing list for your

Perl script not executing from cron job

2012-03-27 Thread Anirban Adhikary
Hi I need to run a perl script from cron tab. so I write a small shell script and call the perl script within that shell script. /usr/bin/perl /home/anirban/perl_code.pl Before calling the perl script I copied all the contents of the .profile file and paste it within the shell script. But still

Re: Perl script not executing from cron job

2012-03-27 Thread Paul Johnson
On Tue, Mar 27, 2012 at 04:30:27PM +0530, Anirban Adhikary wrote: Hi I need to run a perl script from cron tab. so I write a small shell script and call the perl script within that shell script. /usr/bin/perl /home/anirban/perl_code.pl Before calling the perl script I copied all

Re: Perl script not executing from cron job

2012-03-27 Thread Anirban Adhikary
p...@pjcj.net wrote: On Tue, Mar 27, 2012 at 04:30:27PM +0530, Anirban Adhikary wrote: Hi I need to run a perl script from cron tab. so I write a small shell script and call the perl script within that shell script. /usr/bin/perl /home/anirban/perl_code.pl Before calling the perl

Re: Perl script not executing from cron job

2012-03-27 Thread Shawn H Corey
On 12-03-27 10:16 AM, Anirban Adhikary wrote: I have found the solution. I need to write a line to top of my code and its works. use Lib Path to your perl code; then I can run this perl code directly from crontab I dont need a shell script to call the perl code. Try using FindBin. FindBin was

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-13 Thread Randal L. Schwartz
Parag == Parag Kalra paragka...@gmail.com writes: Parag Do we have any Perl module which can parse any other perl script Parag (or module) and fetch information like total number of arrays Parag being used, total number of hashes, total number of scalar Parag variables etc and size information

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-09 Thread Shawn H Corey
On 12-02-08 05:20 PM, Parag Kalra wrote: Do we have any Perl module which can parse any other perl script (or module) and fetch information like total number of arrays being used, total number of hashes, total number of scalar variables etc and size information (like total elements, total keys

Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Parag Kalra
Do we have any Perl module which can parse any other perl script (or module) and fetch information like total number of arrays being used, total number of hashes, total number of scalar variables etc and size information (like total elements, total keys etc) for each data structure in that perl

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Steve Bertrand
On 2012.02.08 17:20, Parag Kalra wrote: Do we have any Perl module which can parse any other perl script (or module) and fetch information like total number of arrays being used, total number of hashes, total number of scalar variables etc and size information (like total elements, total keys

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Jeff Peng
于 2012-2-9 10:15, Steve Bertrand 写道: I would suspect that this would be something that would have to run against the file itself, even prior to compile. Curious task. Might I ask what the purpose of your desire is? I am also not sure what's the special purpuse of the OP. Some modules on

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Parag Kalra
By data-structures being used, I mean the data structures that are actually *declared* in the script. And is it possible to find at least the data-structures stats of the current script that is getting executed if no parser is available. For example if I have a big script or module and if I want

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Jeff Peng
于 2012-2-9 15:21, Parag Kalra 写道: By data-structures being used, I mean the data structures that are actually *declared* in the script. And is it possible to find at least the data-structures stats of the current script that is getting executed if no parser is available. For example if I

Replace words in a file using perl script

2011-12-16 Thread Melvin
Hi, I am a Perl baby :-) I was trying to write a script to replace baby to bigboy in a file:- However the below script doesn't work Could someone help me??? #!/usr/bin/perl -w use strict; open (FILE_IN , $ARGV[0]) || die (ERROR: Gimme Input pleease); my @array_of_lines = FILE_IN; foreach my

Re: Replace words in a file using perl script

2011-12-16 Thread Jim Gibson
On 12/15/11 Thu Dec 15, 2011 7:36 AM, Melvin whereismel...@gmail.com scribbled: Hi, I am a Perl baby :-) I was trying to write a script to replace baby to bigboy in a file:- However the below script doesn't work Could someone help me??? The problem with your script is that you are not

RE: Replace words in a file using perl script

2011-12-16 Thread Kronheim, David (Contr)
From: Melvin [whereismel...@gmail.com] Sent: Thursday, December 15, 2011 10:36 AM To: beginners@perl.org Subject: Replace words in a file using perl script Hi, I am a Perl baby :-) I was trying to write a script to replace baby to bigboy in a file:- However the below script

Re: Replace words in a file using perl script

2011-12-16 Thread Chris Stinemetz
Hello Melvin, Give this a try. I used the advice Jim gave and this is what I came up with. It seems to do what you are asking for. #!/usr/bin/perl use warnings; use strict; my $inFile = input.txt; my $outFile = output.txt; open my $fin, '', $inFile or die ERROR opening $inFile: $!; open my

Re: Replace words in a file using perl script

2011-12-16 Thread Uri Guttman
On 12/16/2011 03:23 PM, Chris Stinemetz wrote: Hello Melvin, Give this a try. I used the advice Jim gave and this is what I came up with. It seems to do what you are asking for. #!/usr/bin/perl use warnings; use strict; my $inFile = input.txt; my $outFile = output.txt; open my $fin, '',

Re: Replace words in a file using perl script

2011-12-16 Thread Brandon McCaig
On Thu, Dec 15, 2011 at 07:36:37AM -0800, Melvin wrote: Hi, Hello: I was trying to write a script to replace baby to bigboy in a file:- However the below script doesn't work Could someone help me??? #!/usr/bin/perl -w use strict; open (FILE_IN , $ARGV[0]) || die (ERROR: Gimme Input

Re: perl script help

2011-10-13 Thread james varghese
Thanks for the Suggestions Ken Slater and Jin Gibson. Sorry for the missing information's. Exactly what you people predicted is correct.($k is a file counter starting at zero, and $Line_Counter is a line counter starting at one) Script is modified according to the suggestions given by you and

perl script help

2011-10-11 Thread james varghese
hi, I am new to perl programming.I am trying with the following script and need help for it. I consolidated 10 excel files(in .txt format) which has same headers in it and so i made it 1 common header at the top.While doing it,in final output file i see a blank row at the beginning of every file

RE: perl script help

2011-10-11 Thread Ken Slater
From: james varghese [mailto:james2...@gmail.com] Sent: Tuesday, October 11, 2011 8:31 AM To: beginners@perl.org Subject: perl script help hi, I am new to perl programming.I am trying with the following script and need help for it. I consolidated 10 excel files(in .txt format) which

Re: perl script help

2011-10-11 Thread Jim Gibson
On 10/11/11 Tue Oct 11, 2011 5:31 AM, james varghese james2...@gmail.com scribbled: hi, I am new to perl programming.I am trying with the following script and need help for it. I consolidated 10 excel files(in .txt format) which has same headers in it and so i made it 1 common header at

Re: running perl script from inside another script collecting output in array

2011-09-15 Thread Shawn H Corey
On 11-09-15 01:07 AM, Jeff Pang wrote: 15 сентября 2011, 08:38 от Rajeev Prasadrp.ne...@yahoo.com: I am now using: my @outfiles = `thecalledscript.pl $filename`; i am getting right results. now question is: is this the best method in terms of efficiency? Not the good way. It's better

Re: running perl script from inside another script collecting output in array

2011-09-15 Thread Peter Scott
On Wed, 14 Sep 2011 21:07:31 -0700, Rajeev Prasad wrote: thecalledscript.pl needs a filename as argument. here is how i am calling it from a thecalling_script: {     local @ARGV;     @ARGV = ($filename);     require thecalledscript.pl; } issue is, the called script prints some

  1   2   3   4   5   6   7   8   9   10   >