On 24 Sep 2008, at 15:44, Rob Dixon wrote:
Andy Dixon wrote:
I may be being a bit dim, but I wrote this:
#!/usr/bin/perl -w
use IO::Socket::INET;
print "ISONAS Logger (perl) v1\n";
my $socket = IO::Socket::INET->new(
PeerAddr => "10.9.1.100",
Pe
> Have a look at the sample data you posted and you will see where.
>
>
> John
I believe I found where the ']' needs to go but didn't see any extra ' '
space.
The $x count seems off. As I see it every time a regex match is made then $x
will increase one. The match numbers results are about 5x g
Stephen Reese wrote:
It appears that there is a space (' ') character at the end of the
pattern where there should be a ']' character.
John, I'm missing where the closing bracket should go.
Have a look at the sample data you posted and you will see where.
John
--
Perl isn't a toolbox, but a
Stephen Reese wrote:
printf() (as seen three lines down) has a format string and a list of
values corresponding to the % escapes in that string. Because you are
using a string literal you should use print() instead.
foreach my $i (sort { $quad{$b} <=> $quad{$a} } keys %quad) {
if ($n++ >= $
> printf() (as seen three lines down) has a format string and a list of
> values corresponding to the % escapes in that string. Because you are
> using a string literal you should use print() instead.
>
> > foreach my $i (sort { $quad{$b} <=> $quad{$a} } keys %quad) {
> >if ($n++ >= $ntop) {
> It appears that there is a space (' ') character at the end of the
> pattern where there should be a ']' character.
John, I'm missing where the closing bracket should go.
while () {
next unless
/Sig:\s*(\d+)\s+Subsig:\s*(\d+)\s+Sev:\s*(\d+)([^\[]+)\[([\d\.]+):(\d+)\s*->
\s*([\d\.]+):(\d
> I just copied over your code and noticed that the end of
> your regular expression (the "/" character) runs across a
> newline. Once I moved that back up to this:
>
> next unless
> /Sig:\s*(\d+)\s+Subsig:\s*(\d+)\s+Sev:\s*(\d+)([^\[]+)\[([\d\.]+):(\d+)
> \s*->\s*([\d\.]+):(\d+)/;
>
> $x is incr
On Wed, Sep 24, 2008 at 2:25 PM, Dan Fish <[EMAIL PROTECTED]> wrote:
> I've got a data file with a bunch of key/value pairs in the format
> "key=value;". There may be only one to a line, or there may be several. I
> know I can figure out how to do this using split, but I thought surely
> there
>
I've got a data file with a bunch of key/value pairs in the format
"key=value;". There may be only one to a line, or there may be several. I
know I can figure out how to do this using split, but I thought surely there
must be a more "elegant" solution. I was trying to do this using the
following
On Wed, 2008-09-24 at 18:32 +0200, Rob Coops wrote:
> Hi all,
>
> I am having some trouble matching the following string:
>
> "Some text+...:...:...:...:...+some more text"
>
> The trick is there are two dilimiters in this string the + and the : are
> used to separate the string, the + signifies
Rob Coops wrote:
Hi all,
Hello,
I am having some trouble matching the following string:
"Some text+...:...:...:...:...+some more text"
The trick is there are two dilimiters in this string the + and the : are
used to separate the string, the + signifies a part of the string ended and
the : s
Hi all,
I am having some trouble matching the following string:
"Some text+...:...:...:...:...+some more text"
The trick is there are two dilimiters in this string the + and the : are
used to separate the string, the + signifies a part of the string ended and
the : signifies a sub part of the st
meh
Deviloper wrote:
>
> If I were in your place, I would use Data::Dumper or a IDE with a grafical
> debugger and take a look what happens. try the 30 Days Trail of Komodo Pro
> Studio
> IDE or OptiPerl is you don´t like data::dumper.
>
> Try in your while loop
>
> m
If I were in your place, I would use Data::Dumper or a IDE with a grafical
debugger and take a look what happens. try the 30Days Trail of Komodo Pro
Studio IDE or OptiPerl is you don´t like data::dumper.
Try in your while loop
my $sender = $text->peerhost()
pri
Andy Dixon wrote:
>
> I may be being a bit dim, but I wrote this:
>
> #!/usr/bin/perl -w
> use IO::Socket::INET;
> print "ISONAS Logger (perl) v1\n";
> my $socket = IO::Socket::INET->new(
> PeerAddr => "10.9.1.100",
> PeerPort => "5321"
>
On Wed, 2008-09-24 at 03:17 -0700, John W. Krahn wrote:
> [EMAIL PROTECTED] wrote:
> > Hi,
>
> Hello,
>
> > We receive a text file with the following entries.
> >
> > "01","item1","apple one","apple two","apple three"
> > "02","item2","body one","body two","body three"
> > "03","item
Hello,
I have just tried this, and have this code:
#!/usr/bin/perl -w
use IO::Socket::INET;
$| = 1;
print "ISONAS Logger (perl) v1\n";
my $socket = IO::Socket::INET->new(
PeerAddr => "10.9.1.100",
PeerPort => "5321"
) or die
Try unbuffer IO, this might be on off the Problem.
$| = 1;
the don´t do:
> > while (true) {
> > $socket->recv($text,128);
> > print $text;
> > }
do
> > while ($socket->recv($text,128)) {
> > print $text;
> > }
Byebye,
Bo
Stewart Anderson <[EMAIL PROTECTED]> hat am
> -Original Message-
> From: Andy Dixon [mailto:[EMAIL PROTECTED]
> Sent: 24 September 2008 12:26
> To: beginners@perl.org
> Subject: Perl Sockets oddity..
>
> Hello,
>
> I may be being a bit dim, but I wrote this:
>
> #!/usr/bin/perl -w
> use IO::Socket::INET;
> print "ISONAS Logger (pe
Hello,
I may be being a bit dim, but I wrote this:
#!/usr/bin/perl -w
use IO::Socket::INET;
print "ISONAS Logger (perl) v1\n";
my $socket = IO::Socket::INET->new(
PeerAddr => "10.9.1.100",
PeerPort => "5321"
) or die $!;
prin
[EMAIL PROTECTED] wrote:
Hi,
Hello,
We receive a text file with the following entries.
"01","item1","apple one","apple two","apple three"
"02","item2","body one","body two","body three"
"03","item2","body one","body two","body three"
"04","item2","body one","body two","body t
Hi,
We receive a text file with the following entries.
"01","item1","apple one","apple two","apple three"
"02","item2","body one","body two","body three"
"03","item2","body one","body two","body three"
"04","item2","body one","body two","body three"
"05","item1","orange one","
23 matches
Mail list logo