Iam using the system command to call an application(windows) that sets up
the enviorment. as per my knowledge, a subshell would be created hence
the modified enviorment would be lost once system returns to the parent perl
script.
How can i modify the parent process enviornment in perl using
Poonam Pahil am Mittwoch, 21. Dezember 2005 10.34:
Iam using the system command to call an application(windows) that sets up
the enviorment. as per my knowledge, a subshell would be created hence
the modified enviorment would be lost once system returns to the parent
perl script.
How can i
every time i make an exe. so i
wrote a perl script.
To set up the env. I have to use the *.cmd file . doing similar things in
the script will not be good. The only way i can do this is to use system or
exec()
I need control back so i use system.
In unix u can use the dot operator to make changes
the build.
I don't want to perform all this manually every time i make an exe.
so i
wrote a perl script.
To set up the env. I have to use the *.cmd file . doing similar
things in
the script will not be good. The only way i can do this is to use
system or
exec()
I need control back so i use
every time i make an exe.
so i
wrote a perl script.
To set up the env. I have to use the *.cmd file . doing similar
things in
the script will not be good. The only way i can do this is to use
system or
exec()
I need control back so i use system.
In unix u can use the dot operator
. doing similar things in
the script will not be good. The only way i can do this is to use system or
exec()
I need control back so i use system.
In unix u can use the dot operator to make changes to the current
shell(env.). i have no idea in case of windows.
can you suggest anything better
Hi All,
What is the difference between
foreach ( system ls) {
if (/1.pl/) {
print ;}}
Here the output is all the file of the CWD.
and
foreach ( ` ls`) {
if (/1.pl/) {
print ;}}
Here is output is only 1.pl
Please explain this to me
Thanks Regards
Swayam
--
To unsubscribe
Hello,
I would like to use a complex CPAN module group that is currently under
active revision. (Task::Catalyst)
Is there a way to use the cpan shell to install a local version of the
module for just this application so I don't have to worry about things
breaking if the main CPAN library install
Hi,
I would have done this.
1) download the module source and dependencies and untar
2) perl Makefile.pl
3) Modify PERLPREFIX,SITEPREFIX,VENDORPREFIX in Makefile to a local folder
4) while starting the application set PERLLIB environment variable to include
the folder.
there might be
Hi,
On 12/16/05, Mohammed Shameer [EMAIL PROTECTED] wrote:
Hi,
I would have done this.
1) download the module source and dependencies and untar
2) perl Makefile.pl
3) Modify PERLPREFIX,SITEPREFIX,VENDORPREFIX in Makefile to a local
folder
4) while starting the application set PERLLIB
On Dec 16, 2005, at 20:36, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hmm... is there a way to do this using the CPAN shell while still
having any
dependency outside certain marked namespaces satisfied from the
server's
main Perl installation? ( Rather than having a local install of
every
In my script there is a external C programme , I have to call it every time
when the script runs .
But the C programme needs to load big dictionary , the time consuming is
more than 5 seconds .
What should I do to make it more efficient , could I modify the C programme
so that when it runs for the
On Sat, Nov 26, 2005 at 09:47:33PM +0800, He Nan wrote:
In my script there is a external C programme , I have to call it every time
when the script runs .
But the C programme needs to load big dictionary , the time consuming is
more than 5 seconds .
What should I do to make it more efficient
Then how well can i write the script to log to a remote server and then
capture the following thing
1. to know the operating system of the logged remote server
2. to know the free space and then the number of drives or partitiones
created in the remote server
Mazhar
On 11/21/05, John Doe
Can't you use Net::SSH::Perl module ?
On Friday 25 November 2005 17:51, Mazhar wrote:
Then how well can i write the script to log to a remote server and then
capture the following thing
1. to know the operating system of the logged remote server
2. to know the free space
Hi Folks,
I have a requirement from the clinet where in i have to take control of the
machines (either by telnet,SSH). My first point to be addressed is how can i
take a remote machine TELNET through perl script and also once i take the
same i have to check the type of operating system
the
same i have to check the type of operating system and then find the size of
the disks partitioned. Waiting for your help at the earliest
I would look at Network Programming with Perl by Lincoln D. Stein. I
might also have a look at CPAN (search.cpan.org) and search for telnet
and or socket.
Dan
to check the type of operating system and then find the size of
the disks partitioned. Waiting for your help at the earliest
Thanks in Advance
Mazhar
Just one thing: Don't use telnet unless absolutely necessary. It's unsecure
since all data is transferred in plain text. Even if you don't login
Hi,
I want to login into a new group using 'newgrp' UNIX command.Every
newgrp command invokes a new shell.
But when I am trying to execute this system command from a perl script
the script is terminating and returning the prompt of the new shell .
Can anyone suggest on what can be done
Suvajit Sengupta wrote:
Hi,
I want to login into a new group using 'newgrp' UNIX command.Every
newgrp command invokes a new shell.
But when I am trying to execute this system command from a perl script
the script is terminating and returning the prompt of the new shell .
Can anyone suggest
On 11/21/05, Shawn Corey [EMAIL PROTECTED] wrote:
Suvajit Sengupta wrote:
Hi,
I want to login into a new group using 'newgrp' UNIX command.Every
newgrp command invokes a new shell.
But when I am trying to execute this system command from a perl script
the script is terminating
/required variables from the
current shell.
After the newgrp system command from a perl script could not satisfy my
need I tried including the command in a separate .cshrc file and then
just sourcing that file from a perl script. But this job could not again
be executed from perl script . The perl
Marilyn Sander wrote:
On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote:
The system function call returns a boolean value as return value, I don't
remember if 1 is for fail and 0 for success or viceversa.
Actually it is not a boolean value. It is a two-byte value, and each
byte is an integer
If I have:
$certificate = /home/oracle/certs/oracle.pem;
$encoded = encode_base64($sha1data);
Can I do something like this:
system('openssl smime smime -sign -outform der -nodetach -out $signed
-signer $certificate -in $encoded');
To get a value for $signed?
Paul Fontenot
WFS - CAST Operations
in some
fashion, assuming the first line of output is what you want.
If you send the results to a file via the -out flag, then you'd have
to specify a file name and then slurp back in the results:
system(openssl smime smime -sign -outform der -nodetach -out
$filename -signer $certificate
hi,
is there any mistake in the script:
#ADDING A TOOL GROUP
system($addgroup \$group\) == 0
or die system @args failed: $?
log_message(the group $group added);
thanks
-
Yahoo! FareChase - Search multiple travel
The system function call returns a boolean value as return value, I don't
remember if 1 is for fail and 0 for success or viceversa.
I think your mistake is the lack of the test construction like if, so
if (system($addgroup \$group\) == 0) {
... do something ...
}
I'm not in a box with perl
On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote:
The system function call returns a boolean value as return value, I
don't
remember if 1 is for fail and 0 for success or viceversa.
Actually it is not a boolean value. It is a two-byte value, and each
byte is an integer. You need to look up
On 11/10/05, Marilyn Sander [EMAIL PROTECTED] wrote:
On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote:
The system function call returns a boolean value as return value, I
don't
remember if 1 is for fail and 0 for success or viceversa.
Actually it is not a boolean value. It is a two-byte
PM
Subject
RE: implementing links on a system
command output(Document link: Derek
Subject
RE: implementing links on a system
command output
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
: The difficulty is that $_ is an entire block of data that
: includes more than just H strings and therefore I cannot link
: all of $_ which is why I placed just the H strings from $_ in an
: array. From this array, I was thinking of traversing
Subject
RE: implementing links on a system
command output
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
: thx Charles, but your code is something I did knew (sic) already.
: I need to implement a link for each H string and I do not see
: this???
I assume by implement a link you mean that you want to
create an HTML ANCHOR tag for each H String.
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
: ok here is what I am trying to do. In the atached doc it shows
: output from my perl cgi program ...
You sent this as a MS Word document. When I open it, Word
converts it to a word web view and when I view the code I get a
Word trashed html
Subject
Re: implementing links on a system
command output
a value you could do somthing like the above. Just one way of many.
understand that the H_string will be generated from a system command for
every $_
and it looks like
sf.H02047 capacty: 189.1G space: 117.7G
Here is my code snippet
sub viewhrtlab
to separate the cgi script name from the list of
fields. I think RFC 2396 explains URIs.
: understand that the H_string will be generated from a system
: command for every $_ and it looks like
:
: sf.H02047 capacty: 189.1G space: 117.7G
Can you show more examples. (Is capacity really spelled wrong
Subject
implementing links on a system
command output
cc
PM
Subject
implementing links on a system
command output
I have written a CGI Perl program
; the outputs will generally be generated
from CGI scripts, though in some cases could be static HTML, too. You
may want to sketch things out on paper rather than just blindly start
coding things. If some part of the input system is doing too much or is
too confusing for users or maintainers
in plain HTML documents or as generated
by the output from CGI scripts; the outputs will generally be generated
from CGI scripts, though in some cases could be static HTML, too. You
may want to sketch things out on paper rather than just blindly start
coding things. If some part of the input system
Subject
Re: implementing links on a system
command output
cc
AM
Subject
Re: implementing links on a system
command output
On 10/14/05, Chris Devers [EMAIL
Subject
Re: implementing links on a system
command output
I have written a CGI Perl program that allows my users to view relevant
data.
The data is produced by a Unix application command and I have told it to
write to a intranet page that looks like:
|--|
| ( ) |
|--|All-Clients
|--|
| ( ) |
|--|Backup-Tapes
|--|
| ( ) |
(kbytes) unlimited
coredump(blocks) 1024
nofiles(descriptors) unlimited
But when I put this in a perl script like
#! /usr/bin/perl
system(ulimit -a);
I get
time(seconds)unlimited
file(blocks) unlimited
data(kbytes) 2097152
stack(kbytes)unlimited
memory(kbytes
I'm using the perl DBI to populate a MSAccess database. I've spent all
morning discovering that I cannot store a URL longer than 255 characters.
I'm using the bind_param function and I get an error when it is longer.
I've tried changing it (the field type) to type memo, hyperlink and text.
None
On Wed, 14 Sep 2005, Siegfried Heintze wrote:
Anyone got any ideas?
Reconsider your choice of database software? :-)
You're accurately describing what would happen if you tried to stuff
more than 255 characters into a VARCHAR field in most databases.
If you need more space than that, most
/perl5/vendor_perl
/usr/lib/perl5/5.8.6/i686-linux
/usr/lib/perl5/5.8.6
/usr/local/lib/site_perl
/usr/lib/perl5/site_perl/5.8.5
.
Now, can I permanently edit the value of the @INC?
I am using a Gentoo system.
Can anybody help?
Thanks.
Andre
--
To unsubscribe, e-mail: [EMAIL
- translated to
Tk/WidgetDemo.pm in the file system - ...
When I give the command perldoc WidgetDemo then I get the
error 'No documentation found for WidgetDemo.'
...so you find the documentation by
perldoc Tk::WidgetDemo
The tail of output from perl -V is:
[...]
@INC:
/etc/perl
I'm not sure, but putting a ; between the commands might work:
system cd ..; pwd
On Mon, 2005-08-29 at 18:06 +0300, Eliyah Kilada wrote:
Hi,
- I agree with u that a shell script is more appropriate, but how I can
write regular expressions in this way ? ;-)
Regards,
Eliyah
Jeff
On Mon, 29 Aug 2005, Eliyah Kilada wrote:
- I agree with [you] that a shell script is more appropriate, but how
can I write regular expressions in this way ? ;-)
By typing them, naturally :-)
In shell scripts, grep, sed awk are the common regex using tools;
depending on what you're doing,
Hi,
It seems that the following code gives unexpected results:
system (cd $dir_name);
system (pwd);
--- this prints the old directory name not the new one. In other words,
the previous (cd) command hasn't taken its effect!
Do anyone know why?
Thanks And Best Regards,
Eliyah
Eliyah Kilada wrote:
Hi,
It seems that the following code gives unexpected results:
system (cd $dir_name);
system (pwd);
--- this prints the old directory name not the new one. In other
words, the previous (cd) command hasn't taken its effect!
Do anyone know why?
Each call to system
Hi,
How can I access a specific child process, such that I put all my system
commands in one child process?
Thanks alot
Eliyah
Bob Showalter wrote:
Eliyah Kilada wrote:
Hi,
It seems that the following code gives unexpected results:
system (cd $dir_name);
system (pwd);
--- this prints
On Aug 29, Eliyah Kilada said:
How can I access a specific child process, such that I put all my system
commands in one child process?
It sounds like you want a shell script rather than a Perl program. Or,
perhaps you should figure out how to do things via Perl rather than
calling
Hi,
- I agree with u that a shell script is more appropriate, but how I can
write regular expressions in this way ? ;-)
Regards,
Eliyah
Jeff 'japhy' Pinyan wrote:
On Aug 29, Eliyah Kilada said:
How can I access a specific child process, such that I put all my
system commands in one
Hello
I am a beginner to perl and I have a question
if I want to use system or open or backticks to
execute a system command,
like system($cmd arg1); ( with system for instance)
and the $cmd which is a prog takes another program
called in arg1 , and that program(arg1) requires
STDIN,
and I
steve tran wrote:
Hello
I am a beginner to perl and I have a question
if I want to use system or open or backticks to
execute a system command,
like system("$cmd arg1"); ( with system for instance)
and the $cmd which is a prog takes another program
called in arg1 , and th
Hello,
I guess I wasnt clear enough in my earlier mail.
what I meant was lets say I have 2 programs,
exe1 and exe2
exe2 is input to exe1
so I want to call this from my perl wrapper as
system (exe1 exe2); or `exe1 exe2`;
If I want to capture STDOUT from exe1
thats simple if I redirect
steve tran wrote:
Hello
Hello,
I am a beginner to perl and I have a question
if I want to use system or open or backticks to
execute a system command,
like system($cmd arg1); ( with system for instance)
and the $cmd which is a prog takes another program
called in arg1
, grover mitchell [EMAIL PROTECTED] wrote:
Hi,
I am trying to use system to run a command on a remote machine.
system ssh, $remote_host[0], sudo, -u, nobody,
/usr/bin/remote_command, --arg1, $arg1, --arg2, $arg2;
The problem I run into is that perl will ssh into the remote host and
give me
, grover mitchell [EMAIL PROTECTED] wrote:
Hi,
I am trying to use system to run a command on a remote machine.
system ssh, $remote_host[0], sudo, -u, nobody,
/usr/bin/remote_command, --arg1, $arg1, --arg2, $arg2;
The problem I run into is that perl will ssh into the remote host and
give me
Hi,
I am trying to use system to run a command on a remote machine.
system ssh, $remote_host[0], sudo, -u, nobody,
/usr/bin/remote_command, --arg1, $arg1, --arg2, $arg2;
The problem I run into is that perl will ssh into the remote host and
give me a shell there, instead of running the remote
grover mitchell wrote:
Hi,
I am trying to use system to run a command on a remote machine.
system ssh, $remote_host[0], sudo, -u, nobody,
/usr/bin/remote_command, --arg1, $arg1, --arg2, $arg2;
The problem I run into is that perl will ssh into the remote host and
give me a shell
- grover mitchell wrote:
- Hi,
-
- I am trying to use system to run a command on a remote machine.
-
- system ssh, $remote_host[0], sudo, -u, nobody,
- /usr/bin/remote_command, --arg1, $arg1, --arg2, $arg2;
-
- The problem I run into is that perl will ssh into the
- remote host
Hi,
Do anyone know how to pass the perl variables to the system in order to
be used later?!
I though of passing them as enviromental variables using
system (export, sys_var_name,= $perl_var_name );
but it doesn't work -:(
Any help is highly appreciated!
Best Regards,
Eliyah
On Aug 18, 2005, at 13:38, Eliyah Kilada wrote:
Do anyone know how to pass the perl variables to the system in
order to be used later?!
Perl offers built-in support for environment variables via the %ENV
hash:
% cat foo.pl
$ENV{FOO} = foo;
system q(echo $FOO);
% perl
On Aug 18, Eliyah Kilada said:
Do anyone know how to pass the perl variables to the system in order to be
used later?!
A process cannot modify its parent's environment. You can set environment
variables to be used during the Perl program that are visible to the Perl
program's child
Robert,
Thanks very much. It works great. Your code was nice and simple.
Much appreciated.
DA
On 7/28/05, Robert [EMAIL PROTECTED] wrote:
I found this maybe it will help:
use strict;
use File::stat;
use POSIX qw(strftime);
my $file = 'test.txt';
my $s =
Dave Adams [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Robert,
Thanks very much. It works great. Your code was nice and simple.
Much appreciated.
DA
I can't take credit. I just GOOGLE'd it.
Glad it helped.
Robert
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
On a Win32 system, how do you get a date stamp of a file?
I used:
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use File::stat;
my $filename = test.txt;
my $stat = stat($filename);
print Dumper($stat);
my $modified_time = stat($filename)-mtime;
print (The modified time of $filename
I found this maybe it will help:
use strict;
use File::stat;
use POSIX qw(strftime);
my $file = 'test.txt';
my $s = stat($file) || die Can't stat($file) $!\n;
my $modtime = strftime('%Y-%m-%d', localtime($s-mtime));
print Modification time of $file is
Hi,
Can someone explain the difference between backticks and system when
evaluated in this if statement:
sub getDate {
print start date\n;
if ( system(/bin/date) ) {
print can't get date\n;
exit(2);
}
print finish date\n;
}
Returns the following:
start date
Thu Jul 28 12:13:59 EST
Keenan, Greg John (Greg)** CTR ** wrote:
Hi,
Can someone explain the difference between backticks and system when
evaluated in this if statement:
The difference really isn't specific to this context, it is the inherent
difference between the two that is affecting the outcome.
perldoc -f
On Jul 28, Keenan, Greg John (Greg)** CTR ** said:
sub getDate {
print start date\n;
if ( system(/bin/date) ) {
print can't get date\n;
exit(2);
}
print finish date\n;
}
system() executes a command, and returns the shell's error code. 0
indicates success, non-0 indicates failure
?
when i call this executable from Perl, on my WinXP system, and assign its
resulting output to a variable, it works great. i'm able to parse the result
for the values im looking for.
but when i call this executable from Perl on a Win98 system, it will not assign
the resulting output at all. it wont
tried so far is shown here:
system(sleep 90 ; some_command_here)
I had the axact same problem a week or so ago. Try:
System( (sleep 90; some_command_here) )
HTH
but as you can guess... this doesnt kick the command off to
the background and as a result the perl
Hey,
Within a perl script of mine, I'd like to execute a shell command but
have it sleep for a few minutes prior to doing so. There are probably
better ways but I can't think/find any at the moment to do so, what I
tried so far is shown here:
system(sleep 90 ; some_command_here
andysayshi wrote:
Hey,
Hello,
Within a perl script of mine, I'd like to execute a shell command but
have it sleep for a few minutes prior to doing so. There are probably
better ways but I can't think/find any at the moment to do so, what I
tried so far is shown here:
system
Hey,
Hi
Within a perl script of mine, I'd like to execute a shell
command but have it sleep for a few minutes prior to doing
so. There are probably better ways but I can't think/find any
at the moment to do so, what I tried so far is shown here:
system(sleep 90
Dear Friends,
I am facing one problem please let me know if anybody knows the solution.
The problem is as follows
use IO::Select;
use IO::Socket;
The variable $sock will be handling my socket id for TCP, AF_INET/PF_INET
family and the code is as shown
Hi,
I can set limit on coredumpsize, stacksize, etc. using the limit command.
limit coredumpsize 2048
But how can I do the same thing from a perl script?
I tried Shell::Source but I guess its only for inherting environment.
TIA.
--Ankur
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On Thu, Apr 21, 2005 at 06:36:26PM +0530, Ankur Gupta wrote:
I can set limit on coredumpsize, stacksize, etc. using the limit command.
limit coredumpsize 2048
But how can I do the same thing from a perl script?
I tried Shell::Source but I guess its only for inherting environment.
Bliss, Thomas W wrote:
I looks interesting. Thanks.
np, please don't top post and always reply to the list and not an
individual :)
The learning curve is hell in this language because there is 300 ways to
do anything.
actually that makes it easier to use as you will likley see later :)
--
To
of the combine -d + parsed dir from the file. I tried some
testing but could not seem to pass the system () any variable data.
3. Then I can use the move within perl to move the file with the
combined -s and -d+ new parsed dir\file from the file.
Any help on the above steps would be greatly appreciated
Bliss, Thomas W wrote:
Hello all, I am new to this list and appreciate all of your help.
I am trying to write a Windows perl script to move files from Windows
volume A to Windows volume B and keep the directory structure. I tried
to use mkdir but it will only create one directory deep.
I'm not
On 4/19/05, JupiterHost.Net wrote:
I'm not sure all those steps below are necessary. Have you looked at
File::Copy::Recursive
?
http://search.cpan.org/~dmuey/File-Copy-Recursive-0.06/Recursive.pm
There's also the mkpath function from File::Path, that can be used
to create a directory
Hello,
I use the script below to print all sorts of system information from my
server and mail it to me. Because these emails get rather large, I
created an HTML index for easy navigation.
This all works fine, but printing the output to a file and then
displaying it again does not seem the best
Hans van Leeuwen wrote:
Hello,
I use the script below to print all sorts of system information from
my server and mail it to me. Because these emails get rather large, I
created an HTML index for easy navigation.
This all works fine, but printing the output to a file and then
displaying
Hans van Leeuwen wrote:
Hello,
Hello,
I use the script below to print all sorts of system information from my
server and mail it to me. Because these emails get rather large, I
created an HTML index for easy navigation.
This all works fine, but printing the output to a file and then
displaying
$file ... \n;
system (webalizer, -c ./webalizer.conf,
/Users/jan/Sites/apache_logs/$file);
}
}
closedir(DIR);
webalizer complains that it cannot find the configuration file (provided via
the -c parameter).
But when I issue
webalizer -c ./webalizer.conf /Users/jan/Sites/apache_logs
On Tuesday 12 April 2005 00:31, Jan Eden wrote:
system (webalizer, -c ./webalizer.conf,
/Users/jan/Sites/apache_logs/$file); }
}
closedir(DIR);
webalizer complains that it cannot find the configuration file
(provided via the -c parameter).
Try:
system (webalizer, -c
Robin wrote on 12.04.2005:
On Tuesday 12 April 2005 00:31, Jan Eden wrote:
system (webalizer, -c ./webalizer.conf,
/Users/jan/Sites/apache_logs/$file); }
}
closedir(DIR);
webalizer complains that it cannot find the configuration file
(provided via the -c parameter).
Try:
system
Hi
This program I use to get the last line from the log file cipe.log. and then
write the line onto a text file a.txt
system(tail -1 cipe.log a.txt);
open INPUT,a.txt;
my $line=INPUT;
then I open the text file and read the value from the file handle.
This invloves cumbersome process. I need
Am Dienstag, 15. März 2005 01.33 schrieb Anish Kumar K.:
Hi
This program I use to get the last line from the log file cipe.log. and
then write the line onto a text file a.txt
system(tail -1 cipe.log a.txt);
open INPUT,a.txt;
my $line=INPUT;
then I open the text file and read the value
On Tue, 15 Mar 2005, Anish Kumar K. wrote:
This program I use to get the last line from the log file cipe.log.
and then write the line onto a text file a.txt
system(tail -1 cipe.log a.txt);
open INPUT,a.txt;
my $line=INPUT;
then I open the text file and read the value from the file
Anish Kumar K. wrote:
Hi
This program I use to get the last line from the log file cipe.log.
and then write the line onto a text file a.txt
system(tail -1 cipe.log a.txt);
open INPUT,a.txt;
my $line=INPUT;
then I open the text file and read the value from the file handle
[EMAIL PROTECTED] (Anish Kumar K.) wrote in
news:[EMAIL PROTECTED]:
system(tail -1 cipe.log a.txt);
open INPUT,a.txt;
my $line=INPUT;
my $line = qx(tail -1 cipe.log);
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http
401 - 500 of 1209 matches
Mail list logo