Re: Complicated sort

2006-11-09 Thread Arnaldo Guzman
On Fri, 2006-11-10 at 00:59 -0500, Arnaldo Guzman wrote: > On Thu, 2006-11-09 at 08:47 -0500, Zielfelder, Robert wrote: > > Greetings: > > > > > > > > I have a sorting problem I need to solve but I'm not sure how to go > > about it. I have an application that dumps a file with a format like >

Re: Complicated sort

2006-11-09 Thread Arnaldo Guzman
On Thu, 2006-11-09 at 08:47 -0500, Zielfelder, Robert wrote: > Greetings: > > > > I have a sorting problem I need to solve but I'm not sure how to go > about it. I have an application that dumps a file with a format like > this: > > > > 19JAN2006.1503 > > 03JAN2006.1647 > > 19DEC2004.053

Help regular expression

2006-11-09 Thread ppp ppp
Hi All ; I am new to this group.I am just started to learn perl.I want to program in perl or C that it input text file(.txt) and it should find every Uppercase letters(Capital letter) in the input file converts every capital letter say with one letter d and lower case letters(small letter

Re: Grep through a log file

2006-11-09 Thread ppp ppp
Hi All ; I am new to this group.I am just started to learn perl.I want to program in perl or C that it input text file(.txt) and it should find every Uppercase letters(Capital letter) in the input file converts every capital letter say with one letter d and lower case letters(small letter

Re: Grep through a log file

2006-11-09 Thread John W. Krahn
ppp ppp wrote: > Hi All ; Hello, > Subject: Re: Grep through a log file It doesn't look like you are replying to the OP and your question is not about 'grep' so you should start a new thread instead of replying to an existing one. > I am new to this group.I am just started to learn perl.I want

Re: Grep through a log file

2006-11-09 Thread Mazhar
On 11/10/06, ppp ppp <[EMAIL PROTECTED]> wrote: Hi All ; I am new to this group.I am just started to learn perl.I want to program in perl or C that it input text file(.txt) and it should find every Uppercase letters(Capital letter) in the input file converts every capital letter say with one l

Re: Grep through a log file

2006-11-09 Thread ppp ppp
Hi All ; I am new to this group.I am just started to learn perl.I want to program in perl or C that it input text file(.txt) and it should find every Uppercase letters(Capital letter) in the input file converts every capital letter say with one letter d and lower case letters(small letter

Hi, how to extract five texts on each side of an URI? I post my own perl script and its use.

2006-11-09 Thread 辉 王
Hello, everyone, Recently, when I want to implement Chakrabarti's algorithm using Perl, I found it difficult for me to extract five texts on each side of an URL(except anchor text). I can make my program do its job at last, but it runs slowly. Can anybody tell me how to improve th

Re: Grep through a log file

2006-11-09 Thread mlist
> > Matt, > > The problem is that has already returned EOF. The next > time around, Perl says "nothing more to see here, folks; move along" > and exits the while block. If you want to read from it again, you need > to reopen it. Just put the open inside the while () block. > That did it, than

Re: Extract data from binary file

2006-11-09 Thread Tom Phoenix
On 11/9/06, Beginner <[EMAIL PROTECTED]> wrote: I have a file that, I think is in a binary format, containing emails. The file is from my email client, Pegasus, and I want to extract all the emails stored within the file and write them to separate files. There are some modules on CPAN for deal

HTTP::Daemon 401 login prompt

2006-11-09 Thread JupiterHost.Net
Howdy, I'm trying to get an HTTP::Daemon to make the browser prompt with a basic authentication login box. With the example at: http://search.cpan.org/perldoc?HTTP::Daemon I just change $c->send_error(RC_FORBIDDEN) to $c->send_error(RC_UNAUTHORIZED) and I get a nice 401 Unauthorized HTML

Re: Extract data from binary file

2006-11-09 Thread lawrence
> > Hi, > HI! And THANKS A LOT for posting your login/password pair -- I am sure many readers will have uploaded messages for your edification. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists

Re: Complicated sort

2006-11-09 Thread Rob Dixon
Zielfelder, Robert wrote: I have a sorting problem I need to solve but I'm not sure how to go about it. I have an application that dumps a file with a format like this: 19JAN2006.1503 03JAN2006.1647 19DEC2004.0530 24MAR2003.1115 As you may have guessed, these are dates and times - timestamps

Re: Incorrect TCP checksum when printing to IO::Socket object

2006-11-09 Thread Jen Spinney
On 11/9/06, Oliver J. Morais <[EMAIL PROTECTED]> wrote: * Jen Spinney <[EMAIL PROTECTED]> [061107 18:34]: > while running ethereal/wireshark, it shows me that the TCP checksums > coming from my requests are always incorrect (the IP checksums are > fine). Just a thought: Maybe you're TCP-Checksu

Re: Grep through a log file

2006-11-09 Thread Jay Savage
On 11/9/06, mlist <[EMAIL PROTECTED]> wrote: First, thanks for your input Jay, Rob, Lawrence Jay, I tried your script. What happens is it gets through the first iteration of the script and copies the appropriate lines to the new log file. But each subsequent iteration is skipped over. This

Re: Complicated sort

2006-11-09 Thread Jay Savage
On 11/9/06, Zielfelder, Robert <[EMAIL PROTECTED]> wrote: Greetings: I have a sorting problem I need to solve but I'm not sure how to go about it. I have an application that dumps a file with a format like this: 19JAN2006.1503 03JAN2006.1647 19DEC2004.0530 24MAR2003.1115 As you may have gue

Re: Grep through a log file

2006-11-09 Thread mlist
> Matt, > > A couple of things here. first, you don't perform any modification of > $culist, but the strings in $culist don't appear unmodified in the log > file. the string perl reads into $_ from a file like you're example is > e.g. "SUN9-GT:\n". The string in the log file, though, is just > "SU

Extract data from binary file

2006-11-09 Thread Beginner
X-cs: R X-CS-Version: 1.0 From: bob <[EMAIL PROTECTED]> X-RS-ID: X-RS-Flags: 0,0,1,1,0,0,0 X-RS-Sigset: -1 To: kevin Subject: New ftp account created Reply-to: [EMAIL PROTECTED] MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8BIT Date: Fri, 20 Jan 20

Re: Complicated sort

2006-11-09 Thread Mumia W.
On 11/09/2006 07:47 AM, Zielfelder, Robert wrote: Greetings: I have a sorting problem I need to solve but I'm not sure how to go about it. I have an application that dumps a file with a format like this: 19JAN2006.1503 03JAN2006.1647 19DEC2004.0530 24MAR2003.1115 As you may

Re: parsing of 8bit binary data bitwise

2006-11-09 Thread Mumia W.
On 11/09/2006 07:04 AM, Dharshana Eswaran wrote: Rajeev, Actually, i get data in hex bytes from a log file. I have to parse them or analyze them according to some predefined rules or values. For eg: a hex byte of 0xa4 is converted to binary as 10100100 Now, i have a file in which the values ar

Re: filtering strings

2006-11-09 Thread Mumia W.
On 11/08/2006 09:00 PM, Bernard van de Koppel wrote: Hi, I am trying to filter out strings with odd characters in directories. In filenames, only the names with alfabetical characters and the charaters with graves like igrave (ì) are allowed. sofar I tried something like $string =~ tr#a-zA-Z

Re: Complicated sort

2006-11-09 Thread lawrence
> Ok, so now Lawrence would you be so kind as to give a little explanation as > to what is going on here? > > I can see that it works but to be honnest after the line: "my @sorted = " I > am lost... > > Thanks in advance, > > Rob Coops > > Okay ... so, the basic algorithm is 1) turn a date

Re: Grep through a log file

2006-11-09 Thread Jay Savage
On 11/9/06, mlist <[EMAIL PROTECTED]> wrote: I hope this is an easy one (I have a feeling it is). I'm trying to parse through a single, large firewall log file. I need to run through a file to get the firewall name and push the associated data to it's own log file. This is what I have so far:

Re: Complicated sort

2006-11-09 Thread Rob Coops
Ok, so now Lawrence would you be so kind as to give a little explanation as to what is going on here? I can see that it works but to be honnest after the line: "my @sorted = " I am lost... Thanks in advance, Rob Coops On 11/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: #!/usr/bin/perl

Re: Grep through a log file

2006-11-09 Thread Rob Coops
Hi Matt, Had a look at this script but it just confused me a bit. So I wrote this that does what you want but works in a slightly diffrent way (end result is the same though) #!/usr/bin/perl use warnings; use strict; # First we make a list of what we want to find my @List; open CULIST, "CULIS

Re: Grep through a log file

2006-11-09 Thread lawrence
> I hope this is an easy one (I have a feeling it is). > > I'm trying to parse through a single, large firewall log file. I need > to run through a file to get the firewall name and push the associated > data to it's own log file. This is what I have so far: > > > #!/usr/bin/perl > > use warn

Re: Complicated sort

2006-11-09 Thread lawrence
#!/usr/bin/perl use strict; use warnings; my %monthmap = ( JAN => '01', FEB => '02', MAR => '03', APR => '04', MAY => '05', JUN => '06', JUL => '07', AUG => '08', SEP => '09', OCT => '10', NOV => '11', DEC => '12' ); my %reversemap = reverse %monthmap; my @sor

Grep through a log file

2006-11-09 Thread mlist
I hope this is an easy one (I have a feeling it is). I'm trying to parse through a single, large firewall log file. I need to run through a file to get the firewall name and push the associated data to it's own log file. This is what I have so far: #!/usr/bin/perl use warnings; use strict; op

RE: Hi everyone, how to extract five texts on each side of an URI? I post my own perl script this time.

2006-11-09 Thread Charles K. Clarkson
Hui Wang wrote: : I can make my program do its job at last, but it runs : slowly. Can anybody tell me how to improve the running : speed of this program? You only provided the module. Can you supply a working example? Something we can actually run? HTH, Charles K.

Complicated sort

2006-11-09 Thread Zielfelder, Robert
Greetings: I have a sorting problem I need to solve but I'm not sure how to go about it. I have an application that dumps a file with a format like this: 19JAN2006.1503 03JAN2006.1647 19DEC2004.0530 24MAR2003.1115 As you may have guessed, these are dates and times - timestamps fo

need to pull info of a website

2006-11-09 Thread Patrick Rice
hi all looking for a direction for the following: I want to know how to pull info off a website with perl.? what cpan library's would I use. Is there any examples and docs on this ? also I would like to know how to read a PDF ? what cpan library's would I use. Is there any examples and docs on t

Re: parsing of 8bit binary data bitwise

2006-11-09 Thread Dharshana Eswaran
Rob, my $i; printf "%-4s => %s\n", $fields[$i++], $_ foreach qw/abc def lmn/; These are arbitrary values. Thanks for the kind and immediate response. I sincerely appreciate it. Thanks and Regards, Dharshana On 11/9/06, Rob Dixon <[EMAIL PROTECTED]> wrote: Dharshana Eswaran wrote: > Hi all,

Re: parsing of 8bit binary data bitwise

2006-11-09 Thread Dharshana Eswaran
Rajeev, Actually, i get data in hex bytes from a log file. I have to parse them or analyze them according to some predefined rules or values. For eg: a hex byte of 0xa4 is converted to binary as 10100100 Now, i have a file in which the values are predefined. It looks like 0xa4 => 10100100 in

filtering strings

2006-11-09 Thread Bernard van de Koppel
Hi, I am trying to filter out strings with odd characters in directories. In filenames, only the names with alfabetical characters and the charaters with graves like igrave (ì) are allowed. sofar I tried something like $string =~ tr#a-zA-Z[xec][x8d][xc3][xac]##cd; This will however return on

Re: parsing of 8bit binary data bitwise

2006-11-09 Thread Rob Dixon
Dharshana Eswaran wrote: Hi all, I wanted to know how to parse a 8bit binary data bitwise? I have my input in hex and i convert it into binary form using the following logic: %h2b = (0 => "", 1 => "0001", 2 => "0010", 3 => "0011", 4 => "0100", 5 => "0101", 6 => "0110", 7 => "0111", 8 =>

Question on Tk::HList

2006-11-09 Thread DJ Gruby
Hi! I've been recently exploring the functionalities of Tk::HList module and I've found it suiting all my needs great, however there's one little thing I cannot resolve myself. The question is how to disable the border (made of dashed line) around the currently selected item? I tried to test all

parsing of 8bit binary data bitwise

2006-11-09 Thread Dharshana Eswaran
Hi all, I wanted to know how to parse a 8bit binary data bitwise? I have my input in hex and i convert it into binary form using the following logic: %h2b = (0 => "", 1 => "0001", 2 => "0010", 3 => "0011", 4 => "0100", 5 => "0101", 6 => "0110", 7 => "0111", 8 => "1000", 9 => "1001", a => "1

Re: Incorrect TCP checksum when printing to IO::Socket object

2006-11-09 Thread Oliver J. Morais
* Jen Spinney <[EMAIL PROTECTED]> [061107 18:34]: > while running ethereal/wireshark, it shows me that the TCP checksums > coming from my requests are always incorrect (the IP checksums are > fine). Just a thought: Maybe you're TCP-Checksum-Offloading on the box running ethereal, so you'll never

Hi everyone, how to extract five texts on each side of an URI? I post my own perl script this time.

2006-11-09 Thread 辉 王
Hello, everyone, Recently, when I want to implement Chakrabarti's algorithm using Perl, I found it difficult for me to extract five texts on each side of an URL(except anchor text). I can make my program do its job at last, but it runs slowly. Can anybody tell me how to improve

RE: Conversion of Hex bytes to binary and vice versa

2006-11-09 Thread Charles K. Clarkson
Dharshana Eswaran wrote: : The desired output should look like the following: : : 0x0a => 1010 : 0x23 => 00100011 : : Can anyone suggest me for the same? Read perlfaq4: How do I convert between numeric representations/bases/radixes? HTH, Charles K. Clarkson

Conversion of Hex bytes to binary and vice versa

2006-11-09 Thread Dharshana Eswaran
Hi all, I have to convert a hex byte [eg: 0x2A] into its binary form [eg:00101010]. The input is always only one byte that is 8 bits. I tried using pack() and unpack(). But i am unable to get desired results. The desired output should look like the following: 0x0a => 1010 0x23 => 00100011