Orchid Fairy (À¼»¨ÏÉ×Ó) wrote:
Hello,
Hello,
After making a connected socket to a tcp server, how to implement the
read/write more than once?
for example:
1) make socket connection
2) write a command to socket
3) read the result from remote server
4) write another command to socket
5) read
Hello,
After making a connected socket to a tcp server, how to implement the
read/write more than once?
for example:
1) make socket connection
2) write a command to socket
3) read the result from remote server
4) write another command to socket
5) read the corresponding result again
6) write...
So write the code like:
unlink $file or die $!;
This will throw up an error message and die.
On Nov 19, 2009, David Christensen wrote:
beginners:
Is unlink() supposed to provide an error message on failure? The
documentation does not say so:
http://www.perl.com/doc/manual/html/pod/pe
David Christensen wrote:
beginners:
Hello,
Is unlink() supposed to provide an error message on failure?
Yes. All Perl functions that interact with the underlying system will
set $! on failure. ($! is the same as errno in C.)
man 3 errno
man 2 unlink
John
--
The programmer is fightin
-邮件原件-
发件人: Chris Charley [mailto:char...@pulsenet.com]
发送时间: 2009年11月19日 5:21
收件人: beginners@perl.org
主题: Re: mkdir in the mounted partition,please help me,thanks
- Original Message -
From: ""Chris Charley""
Newsgroups: perl.beginners
To:
Sent: Wednesday, November 18, 2009
- Original Message -
From: ""Chris Charley""
Newsgroups: perl.beginners
To:
Sent: Wednesday, November 18, 2009 12:39 PM
Subject: Re: mkdir in the mounted partition,please help me,thanks
- Original Message -
From: ""gaochong""
Newsgroups: perl.beginners
To:
Sent: Tuesda
beginners:
Is unlink() supposed to provide an error message on failure? The
documentation does not say so:
http://www.perl.com/doc/manual/html/pod/perlfunc/unlink.html
Testing indicate that unlink() sets $! on failure:
2009-11-18 11:42:40 dpchr...@vmlamp ~
$ cat foo
#! /usr/bi
On Nov 17, 12:32 pm, jimsgib...@gmail.com (Jim Gibson) wrote:
> On 11/17/09 Tue Nov 17, 2009 9:24 AM, "Parag Kalra"
> scribbled:
>
> > Hi All,
>
> > I know this may be a very basic question but I don't know how to accomplish
> > it. :(
>
> > I want to know how to redirect a message simultaneousl
- Original Message -
From: ""gaochong""
Newsgroups: perl.beginners
To:
Sent: Tuesday, November 17, 2009 6:41 AM
Subject: mkdir in the mounted partition,please help me,thanks
#!/usr/bin/perl -w
#Auther:gaochong
use strict;
my @list = (3 .. 9);
my @FA=("FA0001".."FA
On Wed, Nov 18, 2009 at 5:05 PM, Thomas Bätzler wrote:
> Hi,
>
> Dermot suggested:
> > 2009/11/17 mangled...@yahoo.com :
>
> > > Can anyone tell me hoq to write a regular expression which matches
> > > anything _except_ a litteral string ?
> > >
> > > For instance, I want to match any line which
Hi,
Dermot suggested:
> 2009/11/17 mangled...@yahoo.com :
> > Can anyone tell me hoq to write a regular expression which matches
> > anything _except_ a litteral string ?
> >
> > For instance, I want to match any line which does not begin with
> > Nomatch. So in the following :
> You would ne
On Wed, Nov 18, 2009 at 1:53 PM, Jeff Pang wrote:
> For SQLite, just perl -MCPAN -e 'install DBD::SQLite', then use the general
> DBI to create and access SQLite database.
> you even don't need to install SQLite binary program.
>
> On Nov 18, 2009, Dermot wrote:
>
> 2009/11/18 Rob Coops :
> > On
2009/11/17 mangled...@yahoo.com :
> Hi,
Hello,
> Can anyone tell me hoq to write a regular expression which matches
> anything _except_ a litteral string ?
>
> For instance, I want to match any line which does not begin with
> Nomatch. So in the following :
>
> Line1
> Line2
> Nomatch
Hi,
Can anyone tell me hoq to write a regular expression which matches
anything _except_ a litteral string ?
For instance, I want to match any line which does not begin with
Nomatch. So in the following :
Line1
Line2
Nomatch
Line3
Line 4
I would match every line except
Yes, you can use the OID octets instead.
with warm regards,
Venkat Saranathan
Gulf Breeze Software.
On Wed, Nov 18, 2009 at 8:19 AM, Shameem Ahamed wrote:
> On checking the SNMPv2-SMI MIB, i found out that, corresponding to
>
> SNMPv2-SMI::enterprise i can use the 1.3.6.1.4.1
>
> Is it correct
Jackie Jackie wrote:
> Ruud:
#!/usr/bin/perl -w
use strict;
local $/ = "\n\n";
my @data = map [ map [ split /\n/ ], split /\n&\n/ ], ;
>
> This time the code worked. Please explain it to me.
Try this version, and find out yourself:
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
local $/
> -Original Message-
> From: Shawn H Corey [mailto:shawnhco...@gmail.com]
> Sent: Tuesday, November 17, 2009 11:03
> To: Parag Kalra
> Cc: Perl Beginners
> Subject: Re: Is it necessary to open the file again to read
> its contents.
>
> Parag Kalra wrote:
> > Can't this again closing and
Hi,
Thanks for the replies. I asked in this list, because initially i thought it
was a problem with the Net::SNMP module. Sorry for the same.
I have one more doubt. Is there any tool, which i can use for automatically
converting this strings to OIDs.
Regards,
Shammi
- Original Message
> From: Shameem Ahamed [mailto:shameem.aha...@yahoo.com]
>
> SNMPv2-SMI::enterprise i can use the 1.3.6.1.4.1
>
> Is it correct ?. Can i replace the string with this decimal values ?.
>
It's the wrong list for your question, but yes, you can substitute all names
with the corresponding OIDs (
On checking the SNMPv2-SMI MIB, i found out that, corresponding to
SNMPv2-SMI::enterprise i can use the 1.3.6.1.4.1
Is it correct ?. Can i replace the string with this decimal values ?.
Shammi
- Original Message
> From: Shameem Ahamed
> To: beginners@perl.org
> Sent: Wed, November
Hi All,
I am trying to create a script to get the logical disk status using Net::SNMP.
My snmpget query is
snmpget -v2c -t 1 -r 9 -m ALL -v 1 -c public localhost:161
SNMPv2-SMI::enterprises.1714.1.1.2.1.6.1
In this , OID part is SNMPv2-SMI::enterprises.1714.1.1.2.1.6.1
In the Net::SNMP get_re
For SQLite, just perl -MCPAN -e 'install DBD::SQLite', then use the general DBI
to create and access SQLite database.
you even don't need to install SQLite binary program.
On Nov 18, 2009, Dermot wrote:
2009/11/18 Rob Coops :
> On Mon, Nov 16, 2009 at 10:09 PM, Rene Schickbauer <
> rene.schick
2009/11/18 Rob Coops :
> On Mon, Nov 16, 2009 at 10:09 PM, Rene Schickbauer <
> rene.schickba...@magnapowertrain.com> wrote:
>
>> Rob Coops wrote:
>
> Thank you for the advise, I'll certainly be using a DB should this tool ever
> get upgraded to a web based one.
You'd be hard pressed to find a *ni
On Mon, Nov 16, 2009 at 10:09 PM, Rene Schickbauer <
rene.schickba...@magnapowertrain.com> wrote:
> Rob Coops wrote:
>
>> Dear list,
>>
>> I have a question to anyone who has experience with the following
>> situation.
>> I have a very complex array build from hashes containing arrays that
>> cont
Hi gaochong!
I should first note that you've placed a one line separator between each two
consecutive lines which makes your message harder to read.
On Wednesday 18 Nov 2009 09:24:44 gaochong wrote:
> #!/usr/bin/perl -w
>
>
>
> use strict;
>
use strict and warnings - that's good.
>
>
> $
oops. It must be of course:
local $/ = '';
sorry, gabi
-Original Message-
From: Hack, Gabi (ext)
Sent: Wednesday, November 18, 2009 8:57 AM
To: Dr.Ruud; beginners@perl.org
Subject: RE: join lines
Dr.Ruud wrote:
> local $/ = "\n\n";
shorter:
local $\ = ''; # set record separator to
26 matches
Mail list logo