Re: Regex for date

2018-08-25 Thread Chris Charley
"Asad" wrote in message news:cag3lskh4dphjg18c-jxmo8bcqfd+vix5tep1ytsp4_6pd6z...@mail.gmail.com... Hi All , I need a regex to match the date : Sat Aug 25 08:41:03 2018 and covert into a format :'%m/%d/%Y %H:%M:%S' Thanks, -- Asad Hasan +91 9582111698 Hello Asad, You co

Re: calculate within a loop

2016-09-21 Thread Chris Charley
""Chris Charley"" wrote in message news:20160912202839.22177.qm...@lists-nntp.develooper.com... "Nathalie Conte" wrote in message news:9d0654e0-8ec0-4051-87ca-541f90931...@ebi.ac.uk... Dear all, Thanks a lot for the codes various people which all work per

Re: calculate within a loop

2016-09-14 Thread Chris Charley
""Chris Charley"" wrote in message news:20160912202839.22177.qm...@lists-nntp.develooper.com... "Nathalie Conte" wrote in message news:9d0654e0-8ec0-4051-87ca-541f90931...@ebi.ac.uk... Dear all, [snip] many thanks again for any tips/help, Nathalie [Chri

Re: calculate within a loop

2016-09-12 Thread Chris Charley
"Nathalie Conte" wrote in message news:9d0654e0-8ec0-4051-87ca-541f90931...@ebi.ac.uk... Dear all, Thanks a lot for the codes various people which all work perfectly!! I have also discover some useful functions (eval and state) which can also be very helpful for this kind of data. In the li

Re: Regex to match "bad" characters in a parameter

2016-01-26 Thread Chris Charley
"SSC_perl" wrote in message news:ef7499af-b4a5-4b07-8c69-3192ef782...@surfshopcart.com... On Jan 25, 2016, at 4:59 PM, Shawn H Corey wrote: Use the negative match operator !~ if( $QUERY_STRING !~ m{ itemid = [-0-9A-Za-z_]+? (?: \& | \z ) }msx ){ print "bad: $QUERY_STRING\n"; } Tha

Re: other ways to parse emails from html?

2013-01-31 Thread Chris Charley
""Chris Charley"" wrote in message "Jeswin" wrote in message news Hi again, I tried to use the treebuilder modules to get emails from a webpage html but I don't know enough. It just gave me more headaches. My current method get the emails is to go

Re: other ways to parse emails from html?

2013-01-31 Thread Chris Charley
"Jeswin" wrote in message news Hi again, I tried to use the treebuilder modules to get emails from a webpage html but I don't know enough. It just gave me more headaches. My current method get the emails is to go to the site, put the source code in MS Word, and run a regex to get all the e

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
"timothy adigun" wrote in message news:CAEWzkh6mZohVJn__LRL60AGoqbHkmTPyn=JM=cewcmmftpj...@mail.gmail.com... Hello Chris, Please see my comment below. On Fri, Dec 28, 2012 at 10:24 PM, Chris Charley wrote: [snip] I only answered the question using a for loop. Am not t

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
Chris Charley"" wrote in message news Tim wrote in message news:1356726727.215915...@webmail.reagan.com... I hope this is a simple fix. I want to check the beginning characters of items in a hash, and compare that to a scalar variable. I do not need for the entire value to match

Re: Pattern matching to hash

2012-12-28 Thread Chris Charley
Tim wrote in message news:1356726727.215915...@webmail.reagan.com... I hope this is a simple fix. I want to check the beginning characters of items in a hash, and compare that to a scalar variable. I do not need for the entire value to match; just the first couple of characters. Tim my $p

Re: hash help !

2012-11-15 Thread Chris Charley
"jet speed" wrote in message news:CAG1VzcezebNiFar3YKep- What i am trying to do ? I want to match the entries from file1.txt with file.txt, if matches then print the key and value. some will have multiple entries as in the output. required output 10.00.00.00.aa.56.9b.7a 22:5a 10.00.00.00.

Re: hash help !

2012-11-15 Thread Chris Charley
"jet speed" wrote in message news:CAG1VzcezebNiFar3YKep- What i am trying to do ? I want to match the entries from file1.txt with file.txt, if matches then print the key and value. some will have multiple entries as in the output. required output 10.00.00.00.aa.56.9b.7a 22:5a 10.00.00.00.

Re: hash help !

2012-11-15 Thread Chris Charley
"jet speed" wrote in message news:CAG1VzcezebNiFar3YKep- What i am trying to do ? I want to match the entries from file1.txt with file.txt, if matches then print the key and value. some will have multiple entries as in the output. required output 10.00.00.00.aa.56.9b.7a 22:5a 10.00.00.00.

Re: array question

2012-08-19 Thread Chris Charley
""Chris Charley"" wrote in message "Chris Stinemetz" wrote in message news Hello List, I have input data such as far below: I would like to read the data into an array and modify the 2nd index if the 0th and first indices are identical. I would like

Re: array question

2012-08-19 Thread Chris Charley
"Chris Stinemetz" wrote in message news Hello List, I have input data such as far below: I would like to read the data into an array and modify the 2nd index if the 0th and first indices are identical. I would like the updated 2nd index to be an average of the 2nd index where both occurences o

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-04 Thread Chris Charley
"Phil Pinkerton" wrote in message news:7a962da1-a5fb-4046-bbf5-f888dd715...@gmail.com... Very nice to know about CPAN. got a syntax error though with your script syntax error at ./getACLinfo.pl line 51, near "say join" Execution of ./getACLinfo.pl aborted due to compilation errors. [code]

Re: Array elements

2012-07-02 Thread Chris Charley
Hi there: I am very new in Perl and I am trying to write a script to search for similar text in two different files, If it founds a match, it should out put the whole line from the second file in a third file. Let say that my first file (F1) has a list of some samples like Cortezaaerea23489

Re: Help required to extract multiple text fields from a text string

2012-05-26 Thread Chris Charley
""Christopher Gray"" wrote in message news Good day, I have a text file containing records. While I can extract single sub-strings, I cannot extract multiple sub-strings. The records are of multiple types - only about a third of which have the data I need. An example of a "good" record is A

Re: Problem with unless statement

2012-04-28 Thread Chris Charley
wrote in message news:65c0134b-14b8-4912-a22c-d92389b0b...@fannullone.us... Hi Shlomi, Thanks for getting back to me. What you should do is: [CODE] my $host; unless (defined($xtra)) { $host = 'localhost'; } Unfortunately, that gives me the same error. I had tried it before, but I was just

Re: Use of SFTP::Foreign with backend processing and having problems ( not apparent within the code ) in getting remote SFTP to quit it's processes

2012-04-09 Thread Chris Charley
""Wagner, David --- Sr Programmer Analyst --- CFS"" wrote in message I am running AS 5.10.1 on Windows XP SP3 and attempting to use sFTP within my processing communicating to MVS/IBM. What I am trying to do is to do so many gets, then undef the variable and re-login and to continue on to end

Re: comparing arrays

2012-01-11 Thread Chris Charley
"Chris Stinemetz" wrote in message news:ca+hbpzhw7scz2dnabxd0j1bqfcj3vpo7xm_dvrbqmpwrnul...@mail.gmail.com... I have a script where I have captured the value on the left side of the "=" as the header for my table. Now I want to take the value on the right side of the "=" sign and populate a

Re: Manipulating reference to array of array references

2011-11-20 Thread Chris Charley
"Mohan L" wrote in message news:cadihtmt4rqntknjlgsimpgqv9xuc89dryhtx00ctwbknxwd...@mail.gmail.com... Dear all, #!/usr/bin/env perl #dummy.pl use strict; use warnings; use Data::Dumper; my $ref_to_AoA = [ [ "fred", "barney",undef,"pebbles", "bambam", "dino", ], [ "homer",und

Re: regex help

2011-10-10 Thread Chris Charley
"Chris Stinemetz" wrote in message Any help is appreciated. Once I match HEH how can alter the program to print the contents that are in the two lines directly above the match? For example in this case I would like the print results to be: **01 REPT:CELL 983 CDM 1, CCU 1, CE 5, HEHTimest

Re: parsing script removing some lines help please

2011-09-30 Thread Chris Charley
John W. Krahn wrote: Mariano Loza Coll wrote: Hi John, Hello, I'm trying to learn a little bit more of Perl everyday, and I was intrigued about your earlier suggestion in a thread. my $bad_chromosomes = qr/^(?:6|8|14|16|18|Y)\t/; while (<$IN> ) { print $OUT $_ if !/$bad_chromosomes/

Re: regex negative looking up a backtrace

2011-08-24 Thread Chris Charley
Assume I have to find the first unique character in a string $string = "abtable"; # t is the first unique string I tried using a negative backtrace lookup to get the answer in a single regex ... But something is missing. /(.).(?!\1)/ && print $1; it seems fine ... But doesn't work -- Sent fr

Re: understanding adding numeric accumulator

2011-07-08 Thread Chris Charley
""J. S. John"" wrote in message news:caahf0rkhyip680xk9kz+3q4uvw79s2dh8denulob_2gxlyf...@mail.gmail.com... Hi all, I'm teaching myself perl. Right now, I am stuck with this script. I don't understand how it works. I know what it does and how to do it by hand. $n = 1; while ($n < 10) { $s

Re: rmdir

2011-06-24 Thread Chris Charley
"Irfan Sayed" wrote in message news:1308908614.88998.yahoomail...@web125518.mail.ne1.yahoo.com... hi, i need to delete some directories recursively which are present at some shared location i tried file::path perl module but the issue with that module is , it is not deleting the root/p

Re: How to avoid using the slow array subscripting operator?

2011-05-26 Thread charley
On May 26, 5:44 am, jason.li...@gmail.com (Xi Liu) wrote: > I know I am doing the repetitive and useless summing again and again. What > confuses me is that using the same algorithm, I mean > >  for my $i (99 .. 6) > { >       my $sum; >       map {$sum += $_->{foo_value}} @lines[$i - $n + 1 ..

Re: split & re

2011-05-15 Thread charley
On May 15, 12:28 pm, mike.j...@cox.net (Mike McClain) wrote: > In reading in a file of space separated columns of numbers > and stuffing them into an array, I used: >     while( my $line = <$FH> ) >     {   my @arr = split /\s+/, $line; >         push @primes_array, @arr; >     } > > but kept getti

Re: how to parse complex table

2011-04-25 Thread charley
On Apr 23, 11:56 am, abuali...@gmail.com (galeb abu-ali) wrote: > thank you for the advice Shawn, I'll try what you suggest! > BTW, it's not homework, It's supporting metadata for my research and I'm > trying to parse it in a format that will be easier to lookup later. > > thanks again > > galeb H

Re: How to test for 2 words from a list in a form field?

2011-04-08 Thread charley
On Apr 8, 10:59 pm, char...@pulsenet.com wrote: > On Apr 8, 9:06 pm, sono...@fannullone.us wrote: > > >         Three hours later, I finally had a brainstorm, and came up with the > > idea to count the number of occurrences of the words I'm looking for.   > > Here's what I came up with: > > > my $

Re: How to test for 2 words from a list in a form field?

2011-04-08 Thread charley
On Apr 8, 9:06 pm, sono...@fannullone.us wrote: >         Three hours later, I finally had a brainstorm, and came up with the > idea to count the number of occurrences of the words I'm looking for.  Here's > what I came up with: > > my $str = "PO Box 6545 / 3546 Termbo Street"; > my $address_coun

Re: How to test for 2 words from a list in a form field?

2011-04-08 Thread charley
On Apr 8, 9:06 pm, sono...@fannullone.us wrote: >         Three hours later, I finally had a brainstorm, and came up with the > idea to count the number of occurrences of the words I'm looking for.  Here's > what I came up with: > > my $str = "PO Box 6545 / 3546 Termbo Street"; > my $address_coun

Re: Perl Hash Comparison and concatenate result from %hash2 compared to %hash1 into %hash3

2011-04-04 Thread charley
On Apr 4, 3:03 am, wekst...@gmail.com (Wernher Eksteen) wrote: > > Hello Wernher, > > Hi Chris, > > > Rob's code could be reconfigured slightly to do so, but requires a > > different approach.  I will paste it below. > > Ok, thanks. > > > One change I made was to make the *values* of %hash1 an arra

Re: Perl Hash Comparison and concatenate result from %hash2 compared to %hash1 into %hash3

2011-04-03 Thread charley
On Apr 3, 2:31 pm, crypt...@gmail.com (Wernher Eksteen) wrote: > > I suggest you reduce your tab size from eight characters, which leave > > your code spread out and less readable. Four or two is more usual > > nowadays. > > Thank you, I will do so from now on. > > > Meaningful variable names are a

Re: assigning hash key to reference of array question

2011-02-28 Thread charley
On Feb 28, 2:47 pm, rich.j...@gmail.com (steve park) wrote: > I have a below program and I am not doing it right. > Currently, only last ip pool is going in since I am putting them w/ key to > values(so only last one shows up when I print). Hello Steve, The reason you only get the last value for

Re: Behavior of minimal when applied to - {1,}? ot to - {0,}?

2011-02-02 Thread Chris Charley
"Rob Dixon" wrote in message news:4d48bdc7.6050...@gmx.com... On 01/02/2011 02:30, Chris Charley wrote: #!/usr/bin/perl use strict; use warnings; $_ = "[][12/21/10 18:39:22] [oasetup] [oasetup] [INFO] Installing the HPOvXpl package..."; for my $re (qw{ ^\[(.+?)\] ^\[

Behavior of minimal when applied to - {1,}? ot to - {0,}?

2011-02-01 Thread Chris Charley
#!/usr/bin/perl use strict; use warnings; $_ = "[][12/21/10 18:39:22] [oasetup] [oasetup] [INFO] Installing the HPOvXpl package..."; for my $re (qw{ ^\[(.+?)\] ^\[(.*?)\] }) { my ($dt) = /$re/ or die "Horrible death\n";; print $re, ' ', "'$dt'", "\n"; } __END__ C:\Old_Data\perlp>perl t5

Re: \1 in character class?

2010-07-14 Thread Chris Charley
- Original Message - From: "Bryan R Harris" Subject: \1 in character class? I'm trying to temporarily deal with simple quoted strings by turning: data: "this is a string" more: "this is another" into... data: "this is a string" more: "this is another" TIA. - Bryan Here

Re: Getting the text from a PDF file

2010-02-28 Thread Chris Charley
- Original Message - From: ""Ion Pop"" Newsgroups: perl.beginners To: Sent: Sunday, February 28, 2010 7:57 AM Subject: Getting the text from a PDF file Hello, I would like to extract the whole text from a PDF document. Can you recommend a perl module that can do this under Window

Re: Searching First Array in Second Array

2010-01-19 Thread Chris Charley
- Original Message - From: "Parag Kalra" Sent: Tuesday, January 19, 2010 6:45 AM Subject: Searching First Array in Second Array Hello All, I have 2 arrays. I have written a script that searches each and every value of first array in the second array. Each & every value of Source

Re: hash of Arrays

2010-01-18 Thread Chris Charley
- Original Message - From: ""Johnson, Reginald (GTS)"" Newsgroups: perl.beginners To: Sent: Sunday, January 17, 2010 2:42 PM Subject: hash of Arrays I am trying to place the date of each day of the week for each month that has 5 weeks into a hash. For instance my hash key 'Monday' w

Re: Regex problem

2009-12-26 Thread Chris Charley
- Original Message - From: "Owen" Newsgroups: perl.beginners Hello Owen To check the date passed with a script, I first check that the date is in the format 20dd (20 followed by 6 digits exactly) But the regex is wrong, tried /^20\d{6}/,/^20\d{6,6}?/,/^20\d{6,}?/ and while a

Re: Saturdays in a month

2009-12-23 Thread Chris Charley
- Original Message - From: Venkat Saranathan Newsgroups: perl.beginners To: Johnson, Reginald (GTS) Cc: beginners@perl.org Sent: Tuesday, December 22, 2009 10:27 AM Subject: Re: Saturdays in a month You can code a simple time logic to calculate this. Here is a sample code. (Bugs incl

Re: a simple question about the line

2009-11-27 Thread Chris Charley
- Original Message - From: "Dermot" Newsgroups: perl.beginners To: "John W. Krahn" Cc: "Perl Beginners" Sent: Friday, November 27, 2009 12:29 PM Subject: Re: a simple question about the line 2009/11/27 John W. Krahn : Hello, $ echo "12 23 34 45 56 67 78" | perl -lpe'$\=--$|?

Re: mkdir in the mounted partition,please h elp me,thanks

2009-11-18 Thread Chris Charley
- 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""

Re: mkdir in the mounted partition,please h elp me,thanks

2009-11-18 Thread Chris Charley
- 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

Re: Using Heap::Elem

2009-06-30 Thread Chris Charley
- Original Message - From: "Ankit Singla" Hi, I'm trying to use Fibonacci heaps to keep type of objects sorted. I require the sorting to be over the key. I've only started out with Perl and can't figure out how to extend the Heap::Elem class to make this kind of pair objects for u

Re: Using a variable in a =~ match??

2008-10-21 Thread Chris Charley
- Original Message - From: <[EMAIL PROTECTED]> Hi all, Serious noob here (one week into llama 5th ed.). I'm trying to write a script to pull a specific file from a directory and search that file for specific phrases. I am having a problem searching for the file in the directory. If I ty

Re: reference question

2008-09-29 Thread Chris Charley
From: ""Chris Charley"" From: "Richard Lee" one more question on reference, if say you have sub as below my @arrayref; sub do_something { my $something = @_; open FILE, "$something", or die; while () { my @array = ma

Re: reference question

2008-09-29 Thread Chris Charley
From: "Richard Lee" one more question on reference, if say you have sub as below my @arrayref; sub do_something { my $something = @_; open FILE, "$something", or die; while () { my @array = map (split /,/)[1,2,3,5]; push @arrayref, [EMAIL PROTECTED

Re: Processing multiple line

2008-09-17 Thread Chris Charley
- Original Message - From: ""Aali Naser"" Hello All, I have a file with the info in the following format; Start of File= Server Name: ABCDEF Manufacturer: Dell Model: Some Model Number Of Processors (Includes MultiThread): 2 Maximum Clock Speed: 3

Re: local var with no assignment

2008-09-10 Thread Chris Charley
- Original Message - From: "oldyork90" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Wednesday, September 10, 2008 10:19 AM Subject: local var with no assignment True or false. (Trying to figure out why this would be done with no assignment). The reason is that $/ is in

Re: Extracting data from log and reformating

2008-08-15 Thread Chris Charley
On Wed, Aug 13, 2008 at 10:05 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: Kashif Salman wrote: Greetings, Hello, I have a log file like so, and I am trying to get the date on the next line after "Start..." line. So for the log below I'd like to get the output 04/06/05 05/06/05 06/06/05

Re: date info

2008-08-06 Thread Chris Charley
- Original Message - From: ""michael wang"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Wednesday, August 06, 2008 9:00 AM Subject: date info Hi, if I have something like 20080503, how can I get the date a year ago, such as 20070503 in perl? Thanks, michael

Re: question about text operation using regex.

2008-08-06 Thread Chris Charley
- Original Message - From: ""Remy Guo"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Beginners" Sent: Tuesday, August 05, 2008 10:14 PM Subject: question about text operation using regex. hi all, i have a txt log file and i want to delete the 9th character of each line.

Re: question about text operation using regex.

2008-08-05 Thread Chris Charley
- Original Message - From: "Chris Charley" <[EMAIL PROTECTED]> To: Sent: Tuesday, August 05, 2008 10:45 PM Subject: Re: question about text operation using regex. - Original Message - From: ""Remy Guo"" <[EMAIL PROTECTED]> News

Re: question about text operation using regex.

2008-08-05 Thread Chris Charley
- Original Message - From: ""Remy Guo"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Beginners" Sent: Tuesday, August 05, 2008 10:14 PM Subject: question about text operation using regex. hi all, i have a txt log file and i want to delete the 9th character of each line.

Re: rand()

2008-07-30 Thread Chris Charley
From: ""Chris Charley"" From: "Bobby" Newsgroups: perl.beginners Subject: rand() Hi all, How do I use the rand function to print out more than one random number for an array? In the example script below i have an array @nums with a list of numbers; ho

Re: rand()

2008-07-28 Thread Chris Charley
- Original Message - From: "Bobby" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Monday, July 28, 2008 10:54 AM Subject: rand() Hi all, How do I use the rand function to print out more than one random number for an array? In the example script below i have an array @nums

Re: Handling ignore case and single line in pattern matchin

2008-07-11 Thread Chris Charley
- Original Message - From: ""Manasi Bopardikar"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Friday, July 11, 2008 4:23 AM Subject: Handling ignore case and single line in pattern matchin Hi, Does anyone know how to handle ignore case(i) and single line(s) on a regula

Re: Debug Help Please

2008-07-09 Thread Chris Charley
- Original Message - From: "Andy" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, July 08, 2008 9:31 PM Subject: Re: Debug Help Please On Jul 7, 2:16 pm, [EMAIL PROTECTED] (Andy) wrote: On Jul 7, 11:53 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > Andy wrote: > >

Re: comparing two binary numbers

2008-05-11 Thread Chris Charley
- Original Message - From: ""Johnson Lau"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Sunday, May 11, 2008 1:09 AM Subject: comparing two binary numbers Dear all, I need to compare two binary numbers and need perl to return the number of matching bits. For example:

Re: PPM Repository

2008-04-04 Thread Chris Charley
- Original Message - From: "Jim" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Friday, April 04, 2008 6:04 AM Subject: PPM Repository Hi all, I am looking to easily install some modules, like for example Win32::Clipboard, but they don't show with teh standard modules on

Re: user arguments, oracle - insert, delete and drop!

2008-01-11 Thread Chris Charley
- Original Message - From: "perlmunky" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Friday, January 11, 2008 9:11 AM Subject: user arguments, oracle - insert, delete and drop! Hi List, I am in the process of making a web service which will (at some point) query an ora

Re: split based on n number of occurances of a character

2007-10-26 Thread Chris Charley
- Original Message - From: ""Jeff Pang"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Mahurshi Akilla" <[EMAIL PROTECTED]> Cc: Sent: Friday, October 26, 2007 6:51 AM Subject: Re: split based on n number of occurances of a character On 10/26/07, Mahurshi Akilla <[EMAIL PROTECT

Re: System

2007-09-22 Thread Chris Charley
- Original Message - From: "Somu" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Friday, September 21, 2007 11:27 AM Subject: System About that PID problem, i found a program in Windows named tasklist, it prints all the processes running on the system with its id. I used t

Re: working with 3-dimensional array

2007-09-13 Thread Chris Charley
- Original Message - From: ""Chris Charley"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Thursday, September 13, 2007 11:55 PM Subject: Re: working with 3-dimensional array - Original Message - From: "Tim McGeary" <[EMAI

Re: working with 3-dimensional array

2007-09-13 Thread Chris Charley
- Original Message - From: "Tim McGeary" <[EMAIL PROTECTED]> Hi all, I'm trying to read in two file sets of library records, compare a regex that I find in different lines of each set of records, and then copy one whole line over to the other when a match is found. ? To do this

Re: modification

2007-08-20 Thread Chris Charley
- Original Message - From: "Ken Foskey" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "beginners perl" Sent: Monday, August 20, 2007 10:47 AM Subject: modification I have a piece of code that I am assured works and I cannot see why it would. Code is supposed to force undefine

Re: Ability to do numeric and alpha sort in one pass on data which is compirsed of both

2007-08-14 Thread Chris Charley
- Original Message - From: ""Wagner, David --- Senior Programmer Analyst --- WGO"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, August 14, 2007 1:06 PM Subject: Ability to do numeric and alpha sort in one pass on data which is compirsed of both I am attempting

Re: comparing elements of arrays

2007-08-10 Thread Chris Charley
- Original Message - From: ""Tony Heal"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Friday, August 10, 2007 4:23 PM Subject: comparing elements of arrays There has got to be a better way (or more elegant way) to do this. I have 2 DNS files from bind9. I have removed e

Fw: Help needed created this data structure

2007-07-10 Thread Chris Charley
- Original Message - From: "Chris Charley" <[EMAIL PROTECTED]> To: "klute" <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2007 7:17 PM Subject: Re: Help needed created this data structure - Original Message - From: "klute" <[EMA

Re: Help needed created this data structure

2007-07-09 Thread Chris Charley
- Original Message - From: "klute" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Monday, July 09, 2007 4:20 PM Subject: Help needed created this data structure Hi All, I am new to Perl and was hoping to get advice on creating the following data structure: I have an Affi

Re: run script on multiple files

2006-12-23 Thread Chris Charley
- Original Message - From: "Kirk Wythers" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "John W. Krahn" <[EMAIL PROTECTED]> Cc: "Perl Beginners" Sent: Saturday, December 23, 2006 1:32 PM Subject: Re: run script on multiple files Thanks or the reply John. I have a couple of ques

Re: count the characters between the matches

2006-10-23 Thread Chris Charley
- Original Message - From: ""zhihua li"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Monday, October 23, 2006 9:05 PM Subject: count the characters between the matches hi netters, I'm curious if there's any smart code to calculate the "distance" between the matches in

Re: saving surrounding text in substitution

2006-10-10 Thread Chris Charley
- Original Message - From: ""John W. Krahn"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Beginners" Sent: Tuesday, October 10, 2006 4:43 PM Subject: Re: saving surrounding text in substitution Chris Charley wrote: (I've re-wri

Re: saving surrounding text in substitution

2006-10-10 Thread Chris Charley
- Original Message - From: "Kathryn Bushley" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, October 10, 2006 3:17 PM Subject: saving surrounding text in substitution Hi, I've written the following script to substitute names for codes into a phylogenetic tree (new

Re: Parsing HEX Snoop Dump

2006-10-05 Thread Chris Charley
- Original Message - From: <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Monday, October 02, 2006 10:33 AM Subject: Parsing HEX Snoop Dump I'm trying to parse a huge (~2-5MB) Snoop dump from our servers. The output is below: 15:44:14.57313 199.117.205.249 -> s31

Re: String or numbers in AoA?

2006-08-20 Thread Chris Charley
- Original Message - From: "chen li" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Sunday, August 20, 2006 2:20 PM Subject: String or numbers in AoA? Dear all, I try to read some records in one file. Each record consists of several column which are separated by tab and e

Re: passing a list as a variable

2006-07-24 Thread Chris Charley
- Original Message - From: ""Ryan Moszynski"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Monday, July 24, 2006 12:40 PM Subject: passing a list as a variable Is there a way to make my commented 'foreach" line act the same as the line above it? Can I pass a list as a v

Re: Regex find and replace - delete line

2006-07-24 Thread Chris Charley
- Original Message - From: ""John W. Krahn"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Beginners" Sent: Sunday, July 23, 2006 4:33 PM Subject: Re: Regex find and replace - delete line James Turnbull wrote: Hi all Hello, This feels like a really dumb question but

Re: parsing a CSV file with more fields than column names

2006-06-08 Thread Chris Charley
- Original Message - From: ""RICHARD FERNANDEZ"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Thursday, June 08, 2006 11:17 AM Subject: parsing a CSV file with more fields than column names Hello All, I'm just trying to get some ideas for the best way to approach this...

Re: split doubt

2006-05-25 Thread Chris Charley
- Original Message - From: ""Saurabh Singhvi"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl FAq" Sent: Thursday, May 25, 2006 3:38 PM Subject: split doubt Hi the format of split() defines that one can split a string into a fixed number of specifies strings. for eg ($lo

Re: Searching problem in list of lists

2006-05-17 Thread Chris Charley
- Original Message - From: <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "David Romano" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, May 17, 2006 8:02 AM Subject: Re: Searching problem in list of lists Hello, On 5/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > I'm n

Re: Mismatch Positions of Two Ambiguous Strings

2006-04-27 Thread Chris Charley
- Original Message - From: ""Chris Charley"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Thursday, April 27, 2006 5:07 PM Subject: Re: Mismatch Positions of Two Ambiguous Strings - Original Message - From: "Wijaya Edwar

Re: Mismatch Positions of Two Ambiguous Strings

2006-04-27 Thread Chris Charley
- Original Message - From: "Wijaya Edward" <[EMAIL PROTECTED]> Subject: Mismatch Positions of Two Ambiguous Strings Hi, I have two strings that I want to compute the number of mismatches between them. These two strings are of the "same" size. Let's call them 'source' string and 't

Re: increment operator

2006-04-08 Thread Chris Charley
- Original Message - From: "Alan_C" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Saturday, April 08, 2006 8:47 PM Subject: increment operator Hi, [EMAIL PROTECTED]:~$ this_pl_script word array print $size prints at 3 and it finds each of the 3 words entered on the comm

Re: increment operator

2006-04-08 Thread Chris Charley
- Original Message - From: "Alan_C" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Saturday, April 08, 2006 8:47 PM Subject: increment operator Hi, [EMAIL PROTECTED]:~$ this_pl_script word array print $size prints at 3 and it finds each of the 3 words entered on the comm

Re: Taint mode and SQL

2006-03-25 Thread Chris Charley
- Original Message - From: "Tom Allison" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "beginners perl" Sent: Saturday, March 25, 2006 1:33 PM Subject: Taint mode and SQL I was looking at some code of mine and it seems that there is a potential for a problem here that I wasn't

Re: how to translate time string

2006-03-09 Thread Chris Charley
- Original Message - From: "Jeff Pang" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Thursday, March 09, 2006 10:09 AM Subject: how to translate time string Hello,list, Maybe it's a simple problem,but I don't know how to do it. I have a time string,for example: Thu Mar

Re: new for regular expression in Perl

2006-01-04 Thread Chris Charley
- Original Message - From: "chen li" <[EMAIL PROTECTED]> [snip] I think it might be natural for me to read the file line by line and get the return position looks like these(just an example), similar to do the word search in microsoft Word, which is what I really want: match in line

Re: new for regular expression in Perl

2006-01-03 Thread Chris Charley
- Original Message - From: "chen li" <[EMAIL PROTECTED]> Hi all, Here is my problem: my $string="chen schen"; I want to use regular expression to find the exact match in the string. So when I want to match "chen" I expect "chen" only. But use the following line I get both "chen"

Re: please help find logic error in home-brewed brute force anagram solver/creator script

2005-12-30 Thread Chris Charley
- Original Message - From: ""Wolcott, Kenneth A"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Friday, December 30, 2005 3:23 PM Subject: please help find logic error in home-brewed brute force anagram solver/creator script Hi; I have enclosed both the perl source and

Re: Extract text from file

2005-12-07 Thread Chris Charley
- Original Message - From: "Andrej Kastrin" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Beginners List" Sent: Wednesday, December 07, 2005 12:00 PM Subject: Extract text from file Hello dears, I have a file in row data format, which stores different terms (e.g. genes)

Re: File Finding

2005-11-21 Thread Chris Charley
Hello I got the file command to work but it is not as complete as I would have hoped for. I was hoping to get the file size and directory of the file so I could put them into arrays. Is there a way I can do it with the find command? Andrew Yes, File::Find will provide the directory. For

Re: Enlisting All Possible Ranges of An Array

2005-10-25 Thread Chris Charley
Dear Sirs, Given this array: my @array = qw (A B C D E ); I want to enumerate all its possible ranges throughout the elements. Such that it gives the following desired answer, that look like this ( I manually crafted it):. my $ans = [ 'A', 'B',

Re: Comparing file contents (code included)

2005-09-13 Thread Chris Charley
- Original Message - From: "Robert" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, September 13, 2005 1:39 PM Subject: Re: Comparing file contents (code included) Is there a way (since I have the file open) that I can prepend a value (I need a number to be inserte

Re: Read txt file and use each line as regex and output matches to file.

2005-09-11 Thread Chris Charley
- Original Message - From: "Rob Oravec" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Beginners" Sent: Sunday, September 11, 2005 7:13 AM Subject: Re: Read txt file and use each line as regex and output matches to file. Chris Charley wrote:

Re: Read txt file and use each line as regex and output matches to file.

2005-09-10 Thread Chris Charley
- Original Message - From: "Rob Oravec" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "perl.beginners" Sent: Saturday, September 10, 2005 10:15 AM Subject: Read txt file and use each line as regex and output matches to file. Hi All! Please help this beginner! I'll try :-)

  1   2   >