Trina Espinoza wrote:
Does anyone know how to set an shell enviroment using perl? I have tried using the
backticks, the system command, but they
don't seem to be working. I found ENV{'FLEE'} = 'FLEE'; online, but I don't understand
how that works. It sets your enviroment for
a child process but
Robert Citek wrote:
>
> Hello all,
Hello,
> getppid returns the parent process ID given a processes ID. Is there a
> corresponding function which returns a list of child processes IDs?
If YOU create a child process then YOU should store the PID that the
process returns.
John
--
use Perl;
pr
Trina Espinoza wrote:
>
> Does anyone know how to set an shell enviroment using perl? I
> have tried using the backticks, the system command, but they
> don't seem to be working. I found ENV{'FLEE'} = 'FLEE'; online,
> but I don't understand how that works. It sets your enviroment
> for a child pr
Does anyone know how to set an shell enviroment using perl? I have tried using the
backticks, the system command, but they
don't seem to be working. I found ENV{'FLEE'} = 'FLEE'; online, but I don't understand
how that works. It sets your enviroment for
a child process but won't change your cu
Hi all,
I have a CGI script which does a select on a database and builds a checkbox
group iterating through the result of the select. The problem is when a user
submits the form, only the first checked item in the checkbox group is
passed.
Below is the snippet of the perl code that generates th
[EMAIL PROTECTED] wrote:
print 37.75 - 33.67 - 4.08 ;
;
I find these things all the time. Is there a particular module I can use
to fix these things?
Take a look at Math::BigFloat, it's an arbitrary length float math package:
#!/usr/bin/perl -wl
use Math::BigFloat;
$x = 37.75;
Hi Peter,
This is a floating point issue. It is a general computing problem and not
just subject to Perl. In decimal form the result
is -0.0017763568.
Generally thats usually acurate enough. Otherwise you could truncate it or
round it to the nearest quadrabillionth.
Cheers,
Levon Bar
> Its still to short.
>From the WriteExcel docs:
"The width corresponds to the column width value that is specified in Excel.
It is approximately equal to the length of a string in the default font of
Arial 10."
So if you are using a different font or different size it could be way off.
You just
Dan Muey wrote:
> > That won't work if the write decides that "file1" should be a
> > variable instead. Just a thought :-/
>
> Ok, in the example file1 wasn't a variable but if you dod want to do
> \\machine1\share\$file
>
> copy(qq(\\machine1\share\$file),qq(\\mahine2\share\$file)) or ...
>
> W
Hi Bob,
I'm doing data-processing (EDI). I need to format and present values in
text, round here and there. Have lots of various attempts that have failed
for one math related reason or another. Currently I convert to a string
and split and round, etc. (Even modulo '%' has failed me at times).
Paul Kraus wrote:
> That is what I am currently doing.
> So $maxwidth= length $mylargeststring
> But if I then set the width to that length it does not work. Its still
> to short.
>
> Any ideas?
>
You might add a couple to the size of the length, but otherwise I would do all
my checking
That is what I am currently doing.
So $maxwidth= length $mylargeststring
But if I then set the width to that length it does not work. Its still
to short.
Any ideas?
-Original Message-
From: Wagner, David --- Senior Programmer Analyst --- WGO
[mailto:[EMAIL PROTECTED]
Sent: Thursday, A
Rich Parker wrote:
Thanks guys,
This is what I was looking for, more of those undocumented way to do
things. But with the way programmers "Do things" do you find there is a
"Standard" generally when it comes to dealing with hex
variables/characters??
I don't know what you mean by standard. Just
Paul Kraus wrote:
> Is there any way to set the column width to the be as wide as the
> longest cell in that column?
>
> Paul Kraus
$MyWorkSheet->set_column(Col1, Col2, widthdesired);
Now to get width desired, need to do a length of the data being processed and save
Robert Citek wrote:
>
> Hello all,
>
> getppid returns the parent process ID given a processes ID. Is there a
> corresponding function which returns a list of child processes IDs?
>
> I could do an external system call to ps or pstree, but thought perhaps
> something internal to perl might alr
Ronen Kfir wrote:
>
> I need to delete oldest modified file in a directory. I find this file with this:
>
> my $oldest= printf "%s\n", (sort{ (-M $b) <=> (-M$a) } glob("v:\*"));
> print $oldest;
>
> unlink "$oldest";
>
> What I get in response is:
>
> oldest_filename
> 1
>
> File is not delet
Awesome! Thanks Bob!
>>> Bob Showalter <[EMAIL PROTECTED]> [SNIP]
Variables are expanded in backticks, so you need to protect the $ on $1, or
use qx'' around your command (but then you have to protect the single quotes
But there's no need for the awk or grep, since perl has functions to handle
t
I did have use strict; on but it didn't complain... Thanks for the input! I'll use
Perl.
>>> "Hanson, Rob" <[EMAIL PROTECTED]> 08/21/03 14:14 PM >>>
I'm not well versed in awk, but you could use cut instead...
command | grep bf1 | cut -d ' ' -f 1
...Or just use Perl
# untested
my @var = map
Is there any way to set the column width to the be as wide as the
longest cell in that column?
Paul Kraus
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Venkat,
FWIW, I would wrap the whole job in a shell script and have cron execute
that.
Chuck
[EMAIL PROTECTED] wrote:
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
[EMAIL PROTECTED] wrote:
> Luckily I was easily able to recreate the problem. See code below:
>
> print 37.75 - 33.67 - 4.08 ;
> ;
>
> I find these things all the time. Is there a particular
> module I can use
> to fix these things?
>
> Output is
>
> -1.77635683940025e-015
>
rmck wrote:
I was wondering when you get time could you break this down for me?:
print "$1$_$4" for $2..$3;
I'm having a hard time grasping it
OK, I'll explain how the whole program works. (I'm CCing the list, other
people could benefit as well.) Here's the program:
#!/usr/bin/perl -nlw
Luckily I was easily able to recreate the problem. See code below:
print 37.75 - 33.67 - 4.08 ;
;
I find these things all the time. Is there a particular module I can use
to fix these things?
Output is
-1.77635683940025e-015
Should be 0
Running on Win2000 / Intel P3
-Pete
Thanks guys,
This is what I was looking for, more of those undocumented way to do
things. But with the way programmers "Do things" do you find there is a
"Standard" generally when it comes to dealing with hex
variables/characters??
Thanks.
zsdc wrote:
Rich Parker wrote:
$loc = index($rec, $H
Hello all,
getppid returns the parent process ID given a processes ID. Is there a
corresponding function which returns a list of child processes IDs?
I could do an external system call to ps or pstree, but thought perhaps
something internal to perl might already exist. I've Googled, but haven'
On Tue, Aug 19, 2003 at 05:54:42PM -0500, Dan Muey wrote:
> Howdy all:
>
> 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]));
As was pointed out already, don't use the qw().
Here are some interesting bench
I'm not well versed in awk, but you could use cut instead...
command | grep bf1 | cut -d ' ' -f 1
...Or just use Perl
# untested
my @var = map {/^\w+/;$&} grep {/bf1/} `command`;
> on the command line I get exactly what I
> need, why doesn't this work during an
> external call?
Hmmm... my gues
Bill Akins wrote:
> Hi!
>
> I would like to grab the first column (variable width) of data in each
> line that will be returned from an external command.
> I tried @PSARRAY = `command | grep bf1`; and got just the lines with
> data I wanted. The returned data looks like this:
>
> EHCFS001 Boot
Hi!
I would like to grab the first column (variable width) of data in each
line that will be returned from an external command.
I tried @PSARRAY = `command | grep bf1`; and got just the lines with
data I wanted. The returned data looks like this:
EHCFS001 Booted Down bf1/p20 Windows/MU
Hello List,
I'm trying to figure the best method to see if cookies are enabled before proceeding.
So what I've done is this:
METHOD 1:
see if a certain cookie exists and if not set it
then later on teste for the cookie again
it will not be
> am having a problem with my perl scripts in that the news
> items are not being displayed when i execute the wed pages on
Where do these "news items" come from?
> which perl is expected to display the news titles. i have
How does perl get the "news titles" and how are you having it "display
am having a problem with my perl scripts in that the news items are not
being displayed when i execute the wed pages on which perl is expected to
display the news titles.
i have checked the path were perl is being executed from (checked both in
the Apache httpd.conf file and in the scripts) as show
http://lists.perl.org/showlist.cgi?name=ptk
José.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 4:32 PM
To: [EMAIL PROTECTED]
Subject: Tk mailing list
I want to deal with the Tk.
Is there any relevant mailing list to gain informat
I want to deal with the Tk.
Is there any relevant mailing list to gain information?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> >Does such a beast exist in LWP and I just missed it or ???
>
> Yes, you just missed it. Look in the documentation for
> HTTP::Response for these methods:
>
> message
> code
> status_line
Thankd Peter I'll take a look there!
>
> --
> Peter Scott
> http://www.perldebugge
> > What I'd like to be able to do is sometyhign like:
> >
> > else { print $res->errstr; }
>
> Dan
> Have you seen the Oreilly Open books site. It has the "web
> client programming" book online.
> http://www.oreilly.com/openbook/webclient/
>
> here is a snip of code from it that may help:
> -
I need to delete oldest modified file in a directory. I find this file with this:
my $oldest= printf "%s\n", (sort{ (-M $b) <=> (-M$a) } glob("v:\*"));
print $oldest;
unlink "$oldest";
What I get in response is:
oldest_filename
1
File is not deleted.
How would I do it?
?Ronen Kfir
System
> Sorry for leaving the suubject out previously!
>
> With LWP or LWP::UserAgent I can check if the request
> was ok and then print the content if it was like so:
>
> if ($res->is_success) {
> print $res->content;
> }
>
> But I havn't found a way to see what the error is if it
> fails. So
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Dan Muey) writes:
>With LWP or LWP::UserAgent I can check if the request=20
>was ok and then print the content if it was like so:
>
>if ($res->is_success) {
> print $res->content;
>}
>
>But I havn't found a way to see what the error is if it
Without more specifics I can show you how to get the data. This is
assuming a lot because I am confused about what you want to do.
Here is what I gathered.
Read file if line is not all numeric, '-', and spaces then skip.
I am not sure what you want to do with columns that contain 999.999 so I
am
Howdy All,
Sorry for leaving the suubject out previously!
With LWP or LWP::UserAgent I can check if the request
was ok and then print the content if it was like so:
if ($res->is_success) {
print $res->content;
}
But I havn't found a way to see what the error is if it fails. So I have to
Date sent: Thu, 21 Aug 2003 08:54:27 -0400 (Eastern Daylight Time)
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject:Please take me off list
> Please take me off your mailing list. I am receiving hundred
On Thursday, August 21, 2003, at 06:15 AM, Miguel Angel Morales wrote:
Hi all!
I'm programming a tunnelbroker with perl. We are already able to
create tunnels by means of a telnet session using a telnet library of
perl,
but, when I try to delete the tunnel (delete -r tunnel tb-008, for
exampl
Can you send some sample data
-Original Message-
From: Antonio Jose [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 8:58 AM
To: [EMAIL PROTECTED]
Subject: Reading columns, Missing data and more
Hello
I am just learning a bit of Perl but I have some questions;
I have to r
Hello
I am just learning a bit of Perl but I have some questions;
I have to read a file (numbers of rows variable), to obviate the first
lines until I find only columns with numbers, after, I have to create
vectors with each of this columns (indenpendent columns) but obviating
missing data (r
Please take me off your mailing list. I am receiving hundreds of emails daily. Thank you. Gerda
IncrediMail - Email has finally evolved - Click Here
Mark wrote:
>>>-Original Message-
>>>From: mark sony [mailto:[EMAIL PROTECTED]
>>>Sent: mercoledì 20 agosto 2003 15.11
>>>To: [EMAIL PROTECTED]
>>>Cc: [EMAIL PROTECTED]
>>>Subject: create log as well as print on screen
>>>Hi All,
>>>I wrote a script which is running perfectly fine
Hi all!
I'm programming a tunnelbroker with perl. We are already able to create tunnels by
means of a telnet session using a telnet library of perl,
but, when I try to delete the tunnel (delete -r tunnel tb-008, for example) logouts
the telnet session and the tunnel wasn't removed.
The follo
From: "Yupapa.com" <[EMAIL PROTECTED]>
> 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, yo
In unix there is a program called tee.
It works something like
program.pl | tee log.file
you just have program.pl write to STDOUT
alternatively, in your program, you could just do
my $log = "log.file";
open( LOG, ">>log.file" );
print "THING\n";
print LOG "THING\n";
close LOG;
( basically pri
Hey!
If you want to transfer file through the browser, then you don't need an
FTP server.
On submitting the upload form, the browser transmits the file to the web
server, and it is store in a temporary folder where you can ask for. You
need too extra the value of the file field with param('fiel
51 matches
Mail list logo