Hi all,
Can any one say a command or procedure to find out on which OS/Platform does
our current perl script is running.
Thanks in advance for the help
Reards
Anand Kumar
-
Heres a new way to find what you're
I BioKid wrote:
One simple question -
I need to accept a file from the user and to store it as temp1.
then I need to give this file as an input of another program :
I wrote a script like this, but it is not working : Help ?
#!/usr/bin/perl -w
use CGI;
my $q = new CGI;
my $file =
anand kumar wrote:
Hi all,
Hello,
Can any one say a command or procedure to find out on which OS/Platform
does our current perl script is running.
The $^O variable is probably what you want.
perldoc perlvar
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL
Dear Prabu and all,
My purpose is simple,
I have a web-form, that will accept a file,
I need to use this file as an input of a program in my server,
then I need to print the out put on the web page.
I am able to do the second part, but am not able to get the users file to a
variable or array ?
I BioKid wrote:
: I am able to do the second part, but am not able to get
: the users file to a variable or array ?
Read the Files and I/O section of the perlintro
file in the perl documentation.
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
Free Market Advocate
Web Programmer
254
my $file = $q-param('file');
Are you sure the $file exist on your system actually?
open (FOO, temp1);
Under CGI,you maybe always need to specify a full path to the file.Maybe you
would write:
open Foo,/your/path/temp1 or die $!;
while ($file)
Before reading,you should open the $file
Hi All,
I need to send / print / write the output of one command to a file
through perl script
can anybody plz help.
Regards
Irfan.
Sayed, Irfan (Irfan) wrote:
Hi All,
I need to send / print / write the output of one command to a file
through perl script
can anybody plz help.
Regards
Irfan.
Hope this helps
perl -e 'print `command file`;'
Example:
perl -e 'print `ls -l output`;'
--
Prabu.M.A
When I was
On Wed, 2006-07-26 at 11:28 -0700, Travis Thornhill wrote:
Does anyone have any idea why setting $ENV{PATH} = would cause
the open() function to fail? The file I'm trying to open exists, and some
debug
printing shows that I'm in the directory where it exists.
If that is literal then it
On Wed, 2006-07-26 at 23:57 +0530, I BioKid wrote:
One simple question -
I need to accept a file from the user and to store it as temp1.
then I need to give this file as an input of another program :
I wrote a script like this, but it is not working : Help ?
#!/usr/bin/perl -w
use CGI;
my
Hi,
Can u help me in the coding of the Find function. I need to customize
find so that it accepts values of type *.sh etc with last modification
of time of +$time and of $file_type file type. If such a file is
found within the $base_dir directory then that file should be deleted.
Cheers,
Anoop
I have the following code which should
1. Give user a choice of actions
2. Based on these go to the specified script
I have the following issues
1. The Submit button needs clicking twice after selection
2. Only one value can be chosen, to choose another the form must be
reloaded from scratch
After reading Randal's March 2000 LM column and learning that you can
assign a filehandle to a scalar by doing something like:
open(FILE, $filename) or die whatever;
$value = *FILE{IO};
I am wondering if there are other, perhaps better, ways of doing this?
FYI, I googled for assigning
Hi All,
I need to send / print / write the output of one command to a file
through perl script
can anybody plz help.
Regards
Irfan.
On 27 Jul 2006 at 22:20, Sayed, Irfan (Irfan) wrote:
I need to send / print / write the output of one command to a file
through perl script
can anybody plz help.
deja vu...didn't I see this 2 hours ago!
perldoc -q system
or
perlfaq8#how_can_i_capture_stderr_from_an_external_command
--
Hi,
I am executing following code. i need to send the output of
system($cmd); command to the file . how do i do that
plz help
Regards
Irfan.
#/usr/atria/bin/Perl -w
use strict;
use warnings;
my $CT = /usr/atria/bin/cleartool;
my @vob_list = `$CT lsvob -s`;
my $fname =
On Thu, 2006-07-27 at 19:19 +0530, Anoop Kurup wrote:
Hi,
Can u help me in the coding of the Find function. I need to customize
find so that it accepts values of type *.sh etc with last modification
of time of +$time and of $file_type file type. If such a file is
found within the $base_dir
why do you keep on asking the same question?
On Jul 27, 2006, at 9:47 AM, Sayed, Irfan ((Irfan)) wrote:
Hi,
I am executing following code. i need to send the output of
system($cmd); command to the file . how do i do that
plz help
Regards
Irfan.
#/usr/atria/bin/Perl -w
On Thu, 2006-07-27 at 22:47 +0800, Sayed, Irfan (Irfan) wrote:
Hi,
I am executing following code. i need to send the output of
system($cmd); command to the file . how do i do that
plz help
This question has already been answered twice this morning. Please watch
for responses to the
Roman Daszczyszak schreef:
After reading Randal's March 2000 LM column and learning that you can
assign a filehandle to a scalar by doing something like:
open(FILE, $filename) or die whatever;
$value = *FILE{IO};
I am wondering if there are other, perhaps better, ways of doing this?
FYI,
Use lexical ones in the first place.
open my $fh, '', $filename or die open $filename, stopped ;
And if you're gogint to die you might as well say why :)
... or die open $filename failed: $! ;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
On 07/27/2006 09:20 AM, Sayed, Irfan (Irfan) wrote:
Hi All,
I need to send / print / write the output of one command to a file
through perl script
can anybody plz help.
Regards
Irfan.
The Perl documentation which you've already read shows you how
to do this. As reminders, look
Try backticks instead of the system() call to capture the outputh.
E.g. my @results = `$cmd`;
-Original Message-
From: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 7:48 AM
To: beginners@perl.org
Subject: File opeartions help
Hi,
I am executing
On Wednesday 26 July 2006 00:59, Rob Dixon wrote:
Hello Alan
Alan_C wrote:
On Tuesday 25 July 2006 15:56, Rob Dixon wrote:
Nishi Bhonsle wrote:
[ snip ]
[ snip ]
[ snip ]
#!/usr/bin/perl
use strict;
use warnings;
my @dir = do {
# opendir my $dh,
JupiterHost.Net schreef:
Use lexical ones in the first place.
open my $fh, '', $filename or die open $filename, stopped ;
And if you're gogint to die you might as well say why :)
... or die open $filename failed: $! ;
Yes, I meant:
open my $fh, '', $filename or die open $filename,
For posterity:
http://perl.plover.com/local.html#3_The_First_Class_Filehandle_Tr
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Mike Martin wrote:
: I have the following code which should
:
: 1. Give user a choice of actions
: 2. Based on these go to the specified script
:
: I have the following issues
:
: 1. The Submit button needs clicking twice after selection
: 2. Only one value can be chosen, to choose another the
All:
I have a program that reads STDIN for user commands while the program is
running.
I'm adding the capability to queue up user commands from the shell
command line when the program is invoked.
I'd like to be able to queue the command line data up in STDIN, so that
when the program goes into
Gavin Bowlby wrote:
All:
Hello,
I have a program that reads STDIN for user commands while the program is
running.
I'm adding the capability to queue up user commands from the shell
command line when the program is invoked.
I'd like to be able to queue the command line data up in STDIN,
29 matches
Mail list logo