Beast wrote:
> #!/usr/bin/perl
> use strict;
>
> my $log = '/non/existence/dir/test.log';
> my $msg = "test";
> &write_log($msg);
>
> sub write_log {
>my $msg = shift;
>open LOG, ">>$log" || die "Can't write to $log: $!\n";
> print LOG $msg;
>close LOG;
> }
>
> ---
>
> It does
On Oct 21, 2005, at 8:39, Beast wrote:
#!/usr/bin/perl
use strict;
my $log = '/non/existence/dir/test.log';
my $msg = "test";
&write_log($msg);
sub write_log {
my $msg = shift;
open LOG, ">>$log" || die "Can't write to $log: $!\n";
This is a gotcha, it is parsed like this:
open LO
#!/usr/bin/perl
use strict;
my $log = '/non/existence/dir/test.log';
my $msg = "test";
&write_log($msg);
sub write_log {
my $msg = shift;
open LOG, ">>$log" || die "Can't write to $log: $!\n";
print LOG $msg;
close LOG;
}
---
It doesn't die or print any error even $log did not e
Thanks you very much for your kind help!
On 10/20/05, John W. Krahn <[EMAIL PROTECTED]> wrote:
> Franklin wrote:
> > Hi:
>
> Hello,
>
> > I am a real beginner of perl. after looking for Internet for serveral
> > hours, I still can't find the answers for my problem. My question is:
> > Which functi
I know there is a better way to go about this but for some reason the
solution escapes me.
Basically what I am trying to do here is parse through an email file
grab the the basics, from/to/subject put those in a small text tab
separated database in the format of
File NumRecipients From FromIP
I have two suggestions:
One is to go to http://dbi.perl.org and sign up for the dbi-users
mailing list.
Two is just a thought, but have you tried using DBD::ADO instead of
DBD::ODBC?
-Original Message-
From: Siegfried Heintze [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 20, 2005
I'm using perl on a windows machine.
I have a perl batch process populating an MSAccess database and a ASPX C#
front end reading from the (same) MSAccess database. The ASPX/C# works fine
as long as there is not a perl program trying to populate the database. If
there is a perl program populating t
Ryan Frantz wrote:
> Perlers,
>
>
>
> I'm working on a script that will need to email clients if it finds
> files in their respective outbound directories. I've decided on a
> simple config file:
>
>
>
> [foo]
>
> [EMAIL PROTECTED]
>
>
>
> [bar]
>
> [EMAIL PROTECTED]
>
> [EMAIL PROT
Perlers,
I'm working on a script that will need to email clients if it finds
files in their respective outbound directories. I've decided on a
simple config file:
[foo]
[EMAIL PROTECTED]
[bar]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
I've written a simple parser but it doesn't che
> -Original Message-
> From: Bryan R Harris [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 20, 2005 3:02 PM
> To: Beginners Perl
> Subject: Re: HTAB, VTAB in a terminal?
>
>
>
> >>> Curses is a CPAN module, correct?
> >>>
> >>> I have an office-full of users here, most of which wi
>>> Curses is a CPAN module, correct?
>>>
>>> I have an office-full of users here, most of which will not not have that
>>> module installed on their workstations. What's the best way to do something
>>> like that? Can I have my perl script install that module on their machines?
>>> Or can I s
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 20, 2005 2:22 PM
> To: Bryan R Harris
> Cc: Beginners Perl
> Subject: Re: HTAB, VTAB in a terminal?
>
> On Oct 20, Bryan R Harris said:
>
> > Curses is a CPAN module, correct?
> >
> > I
On Oct 20, Bryan R Harris said:
Curses is a CPAN module, correct?
I have an office-full of users here, most of which will not not have that
module installed on their workstations. What's the best way to do something
like that? Can I have my perl script install that module on their machines?
O
> On Oct 20, Bryan R Harris said:
>
>> I'd like to write a perl script to do very simple bitmap editing. The part
>> I can't figure out is how to write text into the terminal at any x,y point.
>> Is this possible?
>>
>> e.g. how can I write an "*" at 10 columns over, 5 rows down in the current
On Oct 20, Bryan R Harris said:
I'd like to write a perl script to do very simple bitmap editing. The part
I can't figure out is how to write text into the terminal at any x,y point.
Is this possible?
e.g. how can I write an "*" at 10 columns over, 5 rows down in the current
terminal?
The Cu
I'd like to write a perl script to do very simple bitmap editing. The part
I can't figure out is how to write text into the terminal at any x,y point.
Is this possible?
e.g. how can I write an "*" at 10 columns over, 5 rows down in the current
terminal?
TIA.
- Bryan
--
To unsubscribe, e-
On Oct 20, Dave Adams said:
I am having troubles understanding how perl sees carriage returns and line
feeds. I am not sure if it is a windows and unix thing.
*Scenario:* I have a HTML form that uploads a text file (via a POST) to a
unix server who then passes it to a perl cgi. This cgi parses
Gladstone Daniel - dglads wrote:
> I noticed that there is various version of
>
> Learning Perl + Perl Cookbook
>
> The most version (Version 4) costs the most. Does it matter the version
> if
> I want to learn or do I need to get the most recent version?
>
> What is the groups thoughts?
>
Steve Bertrand wrote:
> Hi everyone,
>
> This question may seem odd, but here goes anyway.
>
> I've been working at an ISP for a few years now, and have been adding
> to/modifying their current accounting system since I've got here. Of
> course it is all Perl based.
>
> This isn't a technical pr
Hi everyone,
This question may seem odd, but here goes anyway.
I've been working at an ISP for a few years now, and have been adding
to/modifying their current accounting system since I've got here. Of
course it is all Perl based.
This isn't a technical problem I'm having, but the system has wel
I am having troubles understanding how perl sees carriage returns and line
feeds. I am not sure if it is a windows and unix thing.
*Scenario:* I have a HTML form that uploads a text file (via a POST) to a
unix server who then passes it to a perl cgi. This cgi parses through the
file, puts it in an
Mazhar wrote:
> Folks,
Hello,
> I am a software developer and I have a written a script which will read the
> configuration like to address, subject of the mail and the threshold value.
> After reading the three values from the config file i will query the
> database and the result of the query i
Jeff 'japhy' Pinyan [JP], on Thursday, October 20, 2005 at 09:34
(-0400 (EDT)) wrote about:
JP> Stop right there! See the [ at the beginning of the dumped representation
JP> of $response? That means $response is an array reference. It *holds*
JP> objects, but it isn't an object itself.
yes, th
Hello,
Thank you for pointing out that I forgot the semi-colon after $ftp->ascii. The
program works fine now. I was having a problem with the file format being
altered. I am moving a file from VMS to Windows. First thing I learned is that
you have to use $ftp->binary AFTER you login! Also, I t
On Oct 20, Ing. Branislav Gerzo said:
use strict;
use warnings;
use Net::Google;
[snip]
my $response = $session->response();
I dumped response, and beginning is:
$VAR1 = [
bless( {
Stop right there! See the [ at the beginning of the dumped representation
of $response? That mea
On Thu, 20 Oct 2005 [EMAIL PROTECTED] wrote:
Hello.
Please help me write this script. Before this mail i sent to you amil,
and i explained what i need. Thank you very much in advance.
This list continues not to be a free script writing service. Sorry.
Additionally, many of the people on the
Hi pals,
I have this naughty problem, and I am stuck:
use strict;
use warnings;
use Net::Google;
use constant LOCAL_GOOGLE_KEY => "mykey";
my $service = Net::Google->new(key=>LOCAL_GOOGLE_KEY);
my $session = $service->search();
$session->query(qw(Perl modules));
my $response = $session->respo
Franklin wrote:
> Hi:
Hello,
> I am a real beginner of perl. after looking for Internet for serveral
> hours, I still can't find the answers for my problem. My question is:
> Which function I can use to get 2 digits after point for a variable?
> For example, for $j=2.56789, how can I get the very
Hello.
Please help me write this script. Before
this mail i sent to you amil, and i explained what i need. Thank
you very much in advance.
On Oct 20, 2005, at 9:24, Kamalraj Singh Madhan, Noida wrote:
Now I want to add the current date to the name of the zipped up file
i.e. to the variable named 'filen' in the above script...
Is there any date function in shell scripting which can solve this
problem? Kindly suggest.
Yes, you can
On Oct 20, 2005, at 9:07, Franklin wrote:
I am a real beginner of perl. after looking for Internet for serveral
hours, I still can't find the answers for my problem. My question is:
Which function I can use to get 2 digits after point for a variable?
For example, for $j=2.56789, how can I get th
Folks,
I am a software developer and I have a written a script which will read the
configuration like to address, subject of the mail and the threshold value.
After reading the three values from the config file i will query the
database and the result of the query i am genearting a report and the s
Hi Wijaya Edward -
At 2005-10-19, 21:18:16 you wrote:
>
>> Hi:
>
>Hi
>> For example, for $j=2.56789, how can I get the very first two digits
>> after points,ie, I just want to get 2.56.
>> Thank you very much in advance.
>>
>
>Is this what you want?
>
>$ perl -e '$j = 2.56789; $j =~ /(\d\.\d\d)
Hi Guys,
I have a cgi which automates the task of zipping up a complete
directory and its sub directories:
echo "Content-type: text/html"
echo ""
echo ""
echo ""
echo "Building tar file..."
echo ""
cd /var/www/html/
for type in test;
do
filen=${type//\//-}
echo "Building ${filen}.tgz "
tar c
> Hi:
Hi
> For example, for $j=2.56789, how can I get the very first two digits
> after points,ie, I just want to get 2.56.
> Thank you very much in advance.
>
Is this what you want?
$ perl -e '$j = 2.56789; $j =~ /(\d\.\d\d)+/; $ns = $1; print "$ns\n";'
prints: 2.56
Read: perldoc perlretut.
Hi:
I am a real beginner of perl. after looking for Internet for serveral
hours, I still can't find the answers for my problem. My question is:
Which function I can use to get 2 digits after point for a variable?
For example, for $j=2.56789, how can I get the very first two digits
after points,ie,
36 matches
Mail list logo