Re: Help me with a regex problem

2019-10-26 Thread Dermot
You might consider using Regexp::Common::net. It provides a convenient set of functions for matching IP v4, v6 and mac addresses. https://metacpan.org/pod/Regexp::Common::net On Fri, 25 Oct 2019 at 19:43, John W. Krahn wrote: > On 2019-10-25 3:23 a.m., Maggie Q Roth wrote: > > Hello > > Hell

Re: Help me with a regex problem

2019-10-25 Thread John W. Krahn
On 2019-10-25 3:23 a.m., Maggie Q Roth wrote: Hello Hello. There are two primary types of lines in the log: What are those two types? How do you define them? 60.191.38.xx/ 42.120.161.xx /archives/1005 From my point of view those two lines have two fields, the first loo

Re: Help me with a regex problem

2019-10-25 Thread Andy Bach
/(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?\/.*)/ To avoid the "leaning toothpick" problem, Perl lets use different match delimiters, so the above is the same as: m#(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?/.*)# I assume you want to capture the IP and the path, right? if

Re: Help me with a regex problem

2019-10-25 Thread Benjamin S Pendygraft II
That is a backslash followed by a forward slash. The backslash tells the regex parser to treat the next character as a literal character. Useful for matching periods, question marks, brackets, etc. A period matches any character once and an asterisk matches the previous character any number of time

Re: Help me with a regex problem

2019-10-25 Thread X Dungeness
my $n = '[0-9]{1,3}'; if ( =~ ( m[ (?:$n\.){3} $n \s+ \S+ ]x ) { # match } On Fri, Oct 25, 2019 at 3:37 AM Maggie Q Roth wrote: > what's V.*? > > Maggie > > On Fri, Oct 25, 2019 at 6:28 PM Илья Рассадин wrote: > >> For example, this regex >> >> /(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,

Re: Help me with a regex problem

2019-10-25 Thread Maggie Q Roth
what's V.*? Maggie On Fri, Oct 25, 2019 at 6:28 PM Илья Рассадин wrote: > For example, this regex > > /(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?\/.*)/ > > On 25.10.2019 13:23, Maggie Q Roth wrote: > > Hello > > > > There are two primary types of lines in the log: > > > > 60.191.38.

Re: Help me with a regex problem

2019-10-25 Thread Илья Рассадин
For example, this regex /(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?\/.*)/ On 25.10.2019 13:23, Maggie Q Roth wrote: Hello There are two primary types of lines in the log: 60.191.38.xx        / 42.120.161.xx       /archives/1005 I know how to write regex to match each line, but do

Help me with a regex problem

2019-10-25 Thread Maggie Q Roth
Hello There are two primary types of lines in the log: 60.191.38.xx/ 42.120.161.xx /archives/1005 I know how to write regex to match each line, but don't get the good result with one regex to match both lines. Can you help? Thanks, Maggie

Please help me polish the code

2012-03-14 Thread lina
Hi, If you have time, I will be very appreciate you helping transform below code. I have just uploaded the whole files into the following link: https://docs.google.com/open?id=0B93SVRfpVVg3QzdsYUNkOU5SSHEtOTlqVm54WUdjdw can run with perl extractbib.pl sample.tex #!/usr/bin/env perl use strict

Re: help me for this error

2011-05-18 Thread Shlomi Fish
On Wednesday 18 May 2011 12:25:52 ind...@students.itb.ac.id wrote: > Dear all, > > I try to run this script to process my radar data, the script build by > someone, I have asked him, but his advice can not help. This error message > : ARGV error > firstradar velx vely > > This is the Perl code: >

Re: help me for this error

2011-05-18 Thread Uri Guttman
> "S" == Saran writes: S> Try something like S> if(scalar(@ARGV) != 3) { there is no need for scalar there. the != op provides a scalar context so @ARGV will return its count. uri -- Uri Guttman -- u...@stemsystems.com http://www.sysarch.com -- - Perl Code Revie

Re: help me for this error

2011-05-18 Thread Saran
Try something like if(scalar(@ARGV) != 3) { The above statement will execute if there is less than or greater than three command line arguments.. ~ Saran On May 18, 2:37 pm, benignb...@gmail.com (Balachandran Sivakumar) wrote: > On Wed, May 18, 2011 at 2:55 PM,   wrote: > > ARGV error > > first

Re: help me for this error

2011-05-18 Thread Balachandran Sivakumar
On Wed, May 18, 2011 at 2:55 PM, wrote: > ARGV error > firstradar velx vely > > > if(@ARGV != 3){ >    print "ARGV error \n"; >    print "firstradar velx vely \n"; >    exit(1); > } >From what I see, this script expects command line arguments and expects 3 arguments. So, you should run it someth

help me for this error

2011-05-18 Thread indrag
Dear all, I try to run this script to process my radar data, the script build by someone, I have asked him, but his advice can not help. This error message : ARGV error firstradar velx vely This is the Perl code: #! /usr/bin/perl $UNFOLD = 0; #1=UNFOLD^[$B%G!<%?$r;HMQ^[(B 0=^[$B@8^[(Bvolu

Re: help me with a parsing script please

2011-05-13 Thread Rob Dixon
On 12/05/2011 10:23, Nathalie Conte wrote: HI, I have this file format chr start end strand x 12 24 1 x 24 48 1 1 100 124 -1 1 124 148 -1 Basically I would like to create a new file by grouping the start of the first line (12) with the end of the second line (48) and so on the output should lo

Re: help me with a parsing script please

2011-05-12 Thread Peter Lanting
On Thu, May 12, 2011 at 11:23 AM, Nathalie Conte wrote: HI, I have this file format chrstartendstrand x 12241 x24481 1100124-1 1124148-1 Basically I would like to create a new file by grouping the start of the first line (12) with the

Re: help me with a parsing script please

2011-05-12 Thread Mike McClain
On Thu, May 12, 2011 at 10:23:29AM +0100, Nathalie Conte wrote: > I have this file format > chrstartendstrand > x 12241 > I have this script to split and iterate over each line, but I don't > know how to group 2 lines together, and take the start of the firt line > and

Re: help me with a parsing script please

2011-05-12 Thread Brian Fraser
On Thu, May 12, 2011 at 6:23 AM, Nathalie Conte wrote: > I have this script to split and iterate over each line, but I don't know > how to group 2 lines together, and take the start of the firt line and the > end on the second line? could you please advise? thanks > > You have a couple of option

Re: help me with a parsing script please

2011-05-12 Thread John W. Krahn
Nathalie Conte wrote: HI, Hello, I have this file format chr start end strand x 12 24 1 x 24 48 1 1 100 124 -1 1 124 148 -1 Basically I would like to create a new file by grouping the start of the first line (12) with the end of the second line (48) and so on the output should look like thi

Re: help me with a parsing script please

2011-05-12 Thread Rob Coops
You are almost there :-) my ($helper1, $helper2); my $counter = 1; foreach my $line(@list){ chomp $line; my @coordinates = split(/' '/, $region); my $chromosome = $coordinates[0]; my $start = $coordinates[1]; my $end = $coordinates[2]; my $strand = $coordinates[3

help me with a parsing script please

2011-05-12 Thread Nathalie Conte
HI, I have this file format chrstartendstrand x 12241 x24481 1100124-1 1124148-1 Basically I would like to create a new file by grouping the start of the first line (12) with the end of the second line (48) and so on the output shoul

Re: I can't understand this function that what are parameters ,can you help me?

2011-01-05 Thread Alan Haggai Alavi
Hi Yang, > sub ok ($;$) {  } and sub is ($$;$) { } Those are subroutines with prototypes. `sub NAME(PROTO)` `sub ok ($;$)` Requires one mandatory argument and an optional one. They are separated by a semi-colon in the prototype definition. The arguments will be considered in scalar context (due

Re: I can't understand this function that what are parameters ,can you help me?

2011-01-05 Thread Sisyphus
- Original Message - From: "jyang" Hi all : I watch a function that is package "Test::More " ,which is that segment such as : sub ok ($;$) { } and sub is ($$;$) { } please tell me what means "($;$)" , or give me some reference manual let me know it; thank you! http://www.perlmon

Re: I can't understand this function that what are parameters ,can you help me?

2011-01-05 Thread Octavian Rasnita
From: "jyang" Hi all : I watch a function that is package "Test::More " ,which is that segment such as : sub ok ($;$) { } and sub is ($$;$) { } please tell me what means "($;$)" , or give me some reference manual let me know it; thank you! Read: perldoc perlsub If you don't really n

Re: I can't understand this function that what are parameters ,can you help me?

2011-01-05 Thread Shlomi Fish
Hi, On Wednesday 05 Jan 2011 09:02:29 jyang wrote: > Hi all : > > I watch a function that is package "Test::More " ,which is that segment > such as : > sub ok ($;$) { } and sub is ($$;$) { } > > please tell me what means "($;$)" , or give me some reference manual let > me know it; thank you!

I can't understand this function that what are parameters ,can you help me?

2011-01-04 Thread jyang
Hi all : I watch a function that is package "Test::More " ,which is that segment such as : sub ok ($;$) { } and sub is ($$;$) { } please tell me what means "($;$)" , or give me some reference manual let me know it; thank you! 2011-01-05 Best Regards! -Yang

Re: Help me learn Closures.

2010-11-13 Thread Randal L. Schwartz
> "Matthew" == Matthew Young writes: Matthew> What are closures? How are they used? When should they be used? Where Matthew> can I learn more about them? If you can borrow (or buy :) a copy of Intermediate Perl, I have an entire section on closures in there. -- Randal L. Schwartz - Stonehen

Re: Help me learn Closures.

2010-11-12 Thread John W. Krahn
Matthew Young wrote: I often read about closures being one of those 'end all beat all' programming techniques reserved for the most sophisticated and advanced gurus out there. Naturally, I want to learn how to use them, and use them effectively - I know perl supports them! I know its a sort of fu

Re: Help me learn Closures.

2010-11-12 Thread Shlomi Fish
Hi Matthew, On Friday 12 November 2010 19:26:34 Matthew Young wrote: > I often read about closures being one of those 'end all beat all' > programming techniques reserved for the most sophisticated and > advanced gurus out there. Naturally, I want to learn how to use them, > and use them effective

Help me learn Closures.

2010-11-12 Thread Matthew Young
I often read about closures being one of those 'end all beat all' programming techniques reserved for the most sophisticated and advanced gurus out there. Naturally, I want to learn how to use them, and use them effectively - I know perl supports them! I know its a sort of functional programming co

Re: Please help me recover my Perl script.

2009-12-27 Thread Owen
>> >> What does it say in a hex editor? >> > > > # hexdump Test.pl > 000 > * > 0001090 > 0001094 I would take a guess and say don't waste anymore time on it. Put your energies in rewriting the program -- Owen -- To unsubscribe, e

Re: Please help me recover my Perl script.

2009-12-27 Thread Parag Kalra
> > What does it say in a hex editor? > # hexdump Test.pl 000 * 0001090 0001094 Cheers, Parag

Re: Please help me recover my Perl script.

2009-12-27 Thread Owen
>> >> I think it's from UTF-16 to UTF-8. >> >> > > That doesn't seem to work. > > When I try to view my roasted file through 'less' command I get > following > output: > > # less Test.pl > *"Test.pl" may be a binary file. See it anyway? * > > Is there a way I can convert this binary file to its i

Re: Please help me recover my Perl script.

2009-12-27 Thread Parag Kalra
> > I think it's from UTF-16 to UTF-8. > > That doesn't seem to work. When I try to view my roasted file through 'less' command I get following output: # less Test.pl *"Test.pl" may be a binary file. See it anyway? * Is there a way I can convert this binary file to its initial readable state.

Re: Please help me recover my Perl script.

2009-12-27 Thread Shlomi Fish
'iconv' > > with a Perl script which will help me recover my Perl script. > > I think it's from UTF-16 to UTF-8. > Oh! And next time, you should make use of a version control system preferably with a remote and reliable physical server: http://better-scm.berlios.

Re: Please help me recover my Perl script.

2009-12-27 Thread Shlomi Fish
On Friday 25 Dec 2009 09:07:53 Parag Kalra wrote: > Can anyone please let me know how to use 'iconv' command with Perl script. > > I mean what should be my input and output file format while using 'iconv' > with a Perl script which will help me recover my Perl scri

Re: Please help me recover my Perl script.

2009-12-25 Thread Randal L. Schwartz
> "Parag" == Parag Kalra writes: Parag> I was coding my Perl script in Notepad++ editor and it was on verge of Parag> completion. Parag> All of a sudden my machine rebooted. And after that I found all my data Parag> lost. It is containing series of 'NUL' characters. Welcome to Windows. Per

Re: Please help me recover my Perl script.

2009-12-24 Thread Parag Kalra
Can anyone please let me know how to use 'iconv' command with Perl script. I mean what should be my input and output file format while using 'iconv' with a Perl script which will help me recover my Perl script. Hey BTW Merry Christmas to all. :) Cheers, Parag On Fri, D

Please help me recover my Perl script.

2009-12-24 Thread Parag Kalra
Hello All, I was coding my Perl script in Notepad++ editor and it was on verge of completion. All of a sudden my machine rebooted. And after that I found all my data lost. It is containing series of 'NUL' characters. However size of the Perl script is same as it was earlier. Plea

Re: Help me understand

2009-12-05 Thread Uri Guttman
> "SHC" == Shawn H Corey writes: SHC> New-style Perl objects are written in Moose don't claim moose is the only new style objects. nor are they the ultimate as they have their issues too. plain old hash objects are fine for most common classes and better in many cases too than complex thi

Re: Help me understand

2009-12-05 Thread Jenda Krynicky
From: 120 > I've looked at this: > > sub encrypt { > my $self = shift; > my $xx = $$self; > #.. cut stuff I do understand > > return $self->SUPER::encrypt(); > } > > Could someone help me with the Perl to English here? > I get tha

Re: Help me understand

2009-12-05 Thread Shawn H Corey
120 wrote: > On Sat, 2009-12-05 at 08:45 -0500, Someone Something wrote: >> SUPER is a class that controls the superclass of the current class. >> Look here: http://search.cpan.org/~chromatic/SUPER-1.17/lib/SUPER.pm >> >> So, what that means is, run the encrypt method/subroutine/function of >> the

Re: Help me understand

2009-12-05 Thread 120
On Sat, 2009-12-05 at 08:45 -0500, Someone Something wrote: > SUPER is a class that controls the superclass of the current class. > Look here: http://search.cpan.org/~chromatic/SUPER-1.17/lib/SUPER.pm > > So, what that means is, run the encrypt method/subroutine/function of > the superclass of the

Re: Help me understand

2009-12-05 Thread Someone Something
shift; > my $xx = $$self; > #.. cut stuff I do understand > > return $self->SUPER::encrypt(); > } > > Could someone help me with the Perl to English here? > I get that $self is shifting the arguement. > I think I get that $xx is a reference to $self? > I

Help me understand

2009-12-05 Thread 120
#.. cut stuff I do understand return $self->SUPER::encrypt(); } Could someone help me with the Perl to English here? I get that $self is shifting the arguement. I think I get that $xx is a reference to $self? I don't get at all: return $self->SUPER::encrypt(); Is this assignin

答复: mkdir in the mounted partition,pl ease help me,thanks

2009-11-18 Thread gaochong
-邮件原件- 发件人: 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: Wednesda

答复: mkdir in the mounted partiti on£¬please help me£¬thanks

2009-11-17 Thread gaochong
/dev/sdd1 1.7T 639G 1004G 39% /data6 /dev/sdf1 1.7T 1.1T 578G 65% /data8 -邮件原件- 发件人: John W. Krahn [mailto:jwkr...@shaw.ca] 发送时间: 2009年11月18日 14:12 收件人: Perl Beginners 主题: Re: mkdir in the mounted partition£¬please help me£¬thanks gaochong wrote: > #!/us

Re: mkdir in the mounted partition£¬please help me£¬thanks

2009-11-17 Thread John W. Krahn
gaochong wrote: #!/usr/bin/perl -w #Auther:gaochong use strict; my @list = (3 .. 9); my @FA=("FA0001".."FA2000"); sub mk_fa { my ($f) = @_; foreach my $p (@list) { mkdir "/data$p/NRU/$f",0755 or warn "mkdir /data$p/NRU/$f err:$!"; symlink

答复: 答复: mkdir in the mounted par tition,please help me,thanks

2009-11-17 Thread gaochong
I did not receive err msg . -邮件原件- 发件人: Dermot [mailto:paik...@googlemail.com] 发送时间: 2009年11月17日 20:16 收件人: beginners@perl.org 主题: Re: 答复: mkdir in the mounted partition,please help me,thanks 2009/11/17 gaochong : > but I have uses perl -w。 > any other problem ? Did you recei

Re: 答复: mkdir in the mounted partition,please help me,thanks

2009-11-17 Thread Dermot
2009/11/17 gaochong : > but I have uses perl -w。 > any other problem ? Did you receive and error message? Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

答复: mkdir in the mounted partiti on,please help me,thanks

2009-11-17 Thread gaochong
but I have uses perl -w。 any other problem ? -邮件原件- 发件人: Dermot [mailto:paik...@googlemail.com] 发送时间: 2009年11月17日 19:53 收件人: beginners@perl.org 主题: Re: mkdir in the mounted partition,please help me,thanks 2009/11/17 gaochong : > #!/usr/bin/perl -w > > > > #Auther:gaoch

Re: mkdir in the mounted partition,please help me ,thanks

2009-11-17 Thread Dermot
2009/11/17 gaochong : > #!/usr/bin/perl -w > > > > #Auther:gaochong > > > > use strict; > > > > my @list = (3 .. 9); > > my @FA=("FA0001".."FA2000"); > > sub mk_fa { > >        my ($f) = @_; > >        foreach my $p (@list) { > >                mkdir "/data$p/NRU/$f",0755 or warn "mkdir /da

Re: Please Help Me!

2009-07-25 Thread Chas. Owens
On Sat, Jul 25, 2009 at 05:48, Shawn H. Corey wrote: > Umar Draz wrote: >> >> As you can see its not works because there is no space after the word is >> So would you please help me how to solve this. >> > > Change the word boundary, \b, to a not-digit, \D. snip

Re: Please Help Me!

2009-07-25 Thread Shawn H. Corey
Umar Draz wrote: As you can see its not works because there is no space after the word is So would you please help me how to solve this. Change the word boundary, \b, to a not-digit, \D. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and

Re: Please Help me

2009-07-24 Thread Steve Bertrand
Mobile No. is " . $1 . "\n";       > } > As you can see its not works because there is no space after the word is > So would you please help me what kind of change is required in above > regular expression. #!/usr/bin/perl use warnings; use strict; my $str = "&quo

Please Help Me!

2009-07-24 Thread Umar Draz
  } Here is the output of while Your Mobile No. is 0300-4459899 Your Mobile No. is 0356-4094030 Your Mobile No. is 03226789871 its Work almost fine but one mobile no. is missed and that is  My Office Cell is0300-5009228 As you can see its not works because there is no space after the word i

Please Help me

2009-07-24 Thread Umar Draz
re is the output of while Your Mobile No. is 0300-4459899Your Mobile No. is 0356-4094030Your Mobile No. is 03226789871 its Work fine but one mobile no. is missed and that is  My Office Cell is0300-5009228 As you can see its not works because there is no space after the word is So would you please

Re: Help Me

2009-07-10 Thread Steve Bertrand
Christer Ekholm wrote: > Steve Bertrand writes: > >> Umar Draz wrote: >>> Hello Steve >>> >>> Thanks for your help. >>> >>> Would you please help me one thing more >>> >>> I have string e.g >>> >>> $s

Re: Help Me

2009-07-10 Thread Christer Ekholm
Steve Bertrand writes: > Umar Draz wrote: >> Hello Steve >> >> Thanks for your help. >> >> Would you please help me one thing more >> >> I have string e.g >> >> $str = "Hello this is my string (1020p0404), this string is not com

Re: Help Me

2009-07-10 Thread Steve Bertrand
Umar Draz wrote: > Hello Steve > > Thanks for your help. > > Would you please help me one thing more > > I have string e.g > > $str = "Hello this is my string (1020p0404), this string is not complete > (1 034 400 3). now the string complte"; > &g

Re: Help Me

2009-07-09 Thread Chas. Owens
o handle spaces e.g > > $str > = "This is my string my mobile number is 042-6715171 0 30 0- 4 4 5 9 8 > 9 9,  0 42-84 94 94 9, 0 4 1 - 85 80  8 8 0 now the string is complete" > while($line =~ /(([0-9]{3,4}[-]?)?[0-9]{7})/g){ > >    $tel =  $1 > > } > > &

Re: Help Me

2009-07-09 Thread Steve Bertrand
Umar Draz wrote: > Dear User! > > I want to get all telephone and mobile number from a string and save into a > variable. Here is my example what i am doing. > > #!/usr/bin/perl > > $str = "This is my string my mobile number is 0300-4459899, 042-8494949 > 041-8580880 now the string is complete

Help Me

2009-07-09 Thread Umar Draz
1 - 85 80  8 8 0 now the string is complete" while($line =~ /(([0-9]{3,4}[-]?)?[0-9]{7})/g){    $tel = $1 } now this time only (042-6715171) are saved in $tel variable. Would you please help me to solve this issue. Regards, Umar

Re: help me in rearranging line numbers in a file

2008-11-21 Thread Rob Dixon
Gowri Chandra Sekhar Barla, TLS, Chennai wrote: > > Please help me in rearranging line numbers in a file > > Example" > > File.txt > 1 ghghjghjg > 2 1hjkhkjh > 3 > 4 .macro TTT offset > 5 TTT 200 > 6 TTT 300 > 7 fghfghf > 8 hjhjkhjkh >

Re: help me in rearranging line numbers in a file

2008-11-21 Thread Anirban Adhikary
Is this your homework??? On Fri, Nov 21, 2008 at 5:19 PM, Gowri Chandra Sekhar Barla, TLS, Chennai < [EMAIL PROTECTED]> wrote: > > Hi all > > Please help me in rearranging line numbers in a file > > Example" > > File.txt > 1 ghghjghjg > 2 1hjkhkjh &g

help me in rearranging line numbers in a file

2008-11-21 Thread Gowri Chandra Sekhar Barla, TLS, Chennai
Hi all Please help me in rearranging line numbers in a file Example" File.txt 1 ghghjghjg 2 1hjkhkjh 3 4 .macro TTT offset 5 TTT 200 6 TTT 300 7 fghfghf 8 hjhjkhjkh 9 kgghjgg Output should be File.txt 1 ghghjghjg 2 1hjkhkjh 3 .macro TTT offset TTT 200 TTT 300 4 fghf

Re: Please help me w/ my sub

2008-10-14 Thread Richard Lee
Chas. Owens wrote: On Tue, Oct 14, 2008 at 02:15, Richard Lee <[EMAIL PROTECTED]> wrote: below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. snip I found your

Re: Please help me w/ my sub

2008-10-14 Thread Richard Lee
Chas. Owens wrote: On Tue, Oct 14, 2008 at 02:15, Richard Lee <[EMAIL PROTECTED]> wrote: below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. snip I found your

Re: Please help me w/ my sub

2008-10-14 Thread Chas. Owens
On Tue, Oct 14, 2008 at 02:15, Richard Lee <[EMAIL PROTECTED]> wrote: > below sub works fine except the line where key is default. > Instead of printing out PCMU only once, it's printing it out 40 times > randomly.. > Trying to figure out what I did wrong. snip I found your code to be very odd. Y

Re: Please help me w/ my sub

2008-10-14 Thread Richard Lee
John, I think this is now fixed. Still looking to make sure its covering all basis.. sub codec_list { #my @codec_d = qw/0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 # 28 29 30 31 32 33 34 35--71 72--76 77--95 96--127/; my @codec_d = qw

Re: Please help me w/ my sub

2008-10-14 Thread Richard Lee
John W. Krahn wrote: Richard Lee wrote: below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. Please leave me a feedback. thank you. 156 time(s) Codec(s) : unassign

Re: Please help me w/ my sub

2008-10-14 Thread John W. Krahn
Richard Lee wrote: below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. Please leave me a feedback. thank you. 156 time(s) Codec(s) : unassigned_38 185 time(s) Cod

Please help me w/ my sub

2008-10-13 Thread Richard Lee
below sub works fine except the line where key is default. Instead of printing out PCMU only once, it's printing it out 40 times randomly.. Trying to figure out what I did wrong. Please leave me a feedback. thank you. 156 time(s) Codec(s) : unassigned_38 185 time(s) Codec(s) : G729

RE: help me in reading the xml file

2008-01-21 Thread Allam Reddy, Thomas
Thanks Chas Owens for your detailed explanation. It helped me a lot Thanks, Thomas Reddy -Original Message- From: Chas. Owens [mailto:[EMAIL PROTECTED] Sent: Friday, January 18, 2008 9:01 PM To: Allam Reddy, Thomas Cc: beginners@perl.org Subject: Re: help me in reading the xml file On

Re: help me die verbosely

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 2:45 PM, Andy Greenwood <[EMAIL PROTECTED]> wrote: snip > > $SIG{__DIE__} = sub { > > open my $fh, ">>", "something.log" > > or die @_, "could not open something.log: $!"; > > print $fh @_; > > }; > > > > die "Oops"; > > > > Would this not be susceptible to infinite

Re: help me die verbosely

2008-01-18 Thread Andy Greenwood
Chas. Owens wrote: On Jan 17, 2008 9:54 AM, Jonathan Mast <[EMAIL PROTECTED]> wrote: I want to write the errors caught by a 'die' clause into a file. snip Try #!/usr/bin/perl use strict; use warnings; $SIG{__DIE__} = sub { open my $fh, ">>", "something.log" or die @_, "c

Re: help me die verbosely

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 10:51 AM, Jonathan Mast <[EMAIL PROTECTED]> wrote: snip > > #!/usr/bin/perl > > > > use strict; > > use warnings; > > > > $SIG{__DIE__} = sub { > >open my $fh, ">>", "something.log" > >or die @_, "could not open something.log: $!"; > >print $fh @_; > > }; > > > > die

Fwd: help me die verbosely

2008-01-18 Thread Jonathan Mast
-- Forwarded message -- From: Jonathan Mast <[EMAIL PROTECTED]> Date: Jan 18, 2008 10:50 AM Subject: Re: help me die verbosely To: "Chas. Owens" <[EMAIL PROTECTED]> OK, so were binding an anonymous subroutine to the DIE signal? Does this need to go abov

Re: help me in reading the xml file

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 4:54 AM, Allam Reddy, Thomas <[EMAIL PROTECTED]> wrote: > Hi Chas Owens, > > Thanks for your reply. > Is there a way to parse and get the info from xml withou using > XML::Twig? snip There are many XML parsing modules in Perl; unfortunately, none of the are part of Core Perl. In f

RE: help me in reading the xml file

2008-01-18 Thread Allam Reddy, Thomas
Subject: Re: help me in reading the xml file On Jan 18, 2008 4:34 AM, Allam Reddy, Thomas <[EMAIL PROTECTED]> wrote: > Hi Chas Owens, > > Thanks for your reply. > > I am getting the following error when running the code given in the > mail. > > > Can't locate XM

RE: help me in reading the xml file

2008-01-18 Thread Allam Reddy, Thomas
this? -Original Message- From: Chas. Owens [mailto:[EMAIL PROTECTED] Sent: Thursday, January 17, 2008 9:38 PM To: Allam Reddy, Thomas Cc: beginners@perl.org Subject: Re: help me in reading the xml file On Jan 17, 2008 5:53 AM, Allam Reddy, Thomas <[EMAIL PROTECTED]> wrote: snip > I have got an

Re: help me in reading the xml file

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 4:34 AM, Allam Reddy, Thomas <[EMAIL PROTECTED]> wrote: > Hi Chas Owens, > > Thanks for your reply. > > I am getting the following error when running the code given in the > mail. > > > Can't locate XML/Twig.pm in @INC (@INC contains: snip XML::Twig is not part of Core Perl. It (a

Re: help me die verbosely

2008-01-17 Thread Rob Dixon
Jonathan Mast wrote: I want to write the errors caught by a 'die' clause into a file. In others words, open F ">>somefile.log"; blah->blah or die (print F $@) but the above does work. die() sends its output to STDERR, so open STDERR, '>', 'somefile.log' or die $!; blah->blah or

Re: help me in reading the xml file

2008-01-17 Thread Chas. Owens
On Jan 17, 2008 5:53 AM, Allam Reddy, Thomas <[EMAIL PROTECTED]> wrote: snip > I have got an xml like this below. I want to read this file in Perl and > want to retrieve the text which end with .xml. > > For example , I want to print the text "jms/hppjmsmodules-jms.xml", > since it ends with .xml s

Re: help me die verbosely

2008-01-17 Thread Chas. Owens
On Jan 17, 2008 9:54 AM, Jonathan Mast <[EMAIL PROTECTED]> wrote: > I want to write the errors caught by a 'die' clause into a file. snip Try #!/usr/bin/perl use strict; use warnings; $SIG{__DIE__} = sub { open my $fh, ">>", "something.log" or die @_, "could not open something.log:

help me die verbosely

2008-01-17 Thread Jonathan Mast
I want to write the errors caught by a 'die' clause into a file. In others words, open F ">>somefile.log"; blah->blah or die (print F $@) but the above does work. thanks

help me in reading the xml file

2008-01-17 Thread Allam Reddy, Thomas
Hi All, I have got an xml like this below. I want to read this file in Perl and want to retrieve the text which end with .xml. For example , I want to print the text "jms/hppjmsmodules-jms.xml", since it ends with .xml Thanks in advance for your help. http://www.bea.com/ns/weblogic/90/

Re: Help me with an url rewrite

2007-08-10 Thread Nils Kaiser
Hello, well this is more of a mod_rewrite question. The problem is that you have to use the QUERY_STRING variable in order to access parameters, these are not part of the normal scope of the RewriteCond / RewriteRule stuff. Refer to the mod_rewrite guide for that. We use this to append a use

RE: Help me with an url rewrite

2007-08-10 Thread Cristi Ocolisan
: Help me with an url rewrite Hmm, then please don't post your WRONG solution sample. -Original Message- From: [EMAIL PROTECTED] To: beginners@perl.org Sent: Fri, 10 Aug 2007 6.26PM Subject: Re: Help me with an url rewrite Hmm, 1. I did not sent a solution. 2. I

Re: Help me with an url rewrite

2007-08-10 Thread pennyyh
Hmm, then please don't post your WRONG solution sample. -Original Message- From: [EMAIL PROTECTED] To: beginners@perl.org Sent: Fri, 10 Aug 2007 6.26PM Subject: Re: Help me with an url rewrite Hmm, 1. I did not sent a solution. 2. I just suggested how you should

Re: Help me with an url rewrite

2007-08-10 Thread pennyyh
Thank you.it works perfectly. -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: beginners@perl.org; [EMAIL PROTECTED] Sent: Fri, 10 Aug 2007 6.16PM Subject: Re: Help me with an url rewrite Hello, well this is more of a mod_rewrite question. The problem is that you

Re: Help me with an url rewrite

2007-08-10 Thread Cristi Ocolisan
: Friday, August 10, 2007 1:15 PM To: [EMAIL PROTECTED] Cc: beginners@perl.org Subject: Re: Help me with an url rewrite Sorry first. But have you looked at my question carefully? Your solution CAN'T work at all! -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; begi

Re: Help me with an url rewrite

2007-08-10 Thread pennyyh
Sorry first. But have you looked at my question carefully? Your solution CAN'T work at all! -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; beginners@perl.org CC: [EMAIL PROTECTED] Sent: Fri, 10 Aug 2007 6.06PM Subject: RE: Help me with an url rewrite First, yo

RE: Help me with an url rewrite

2007-08-10 Thread Cristi Ocolisan
lian company -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, August 10, 2007 12:53 PM To: beginners@perl.org Cc: [EMAIL PROTECTED] Subject: Help me with an url rewrite I'm not sure if I've asked the correct lists,but hope I can get some helps h

Help me with an url rewrite

2007-08-10 Thread pennyyh
I'm not sure if I've asked the correct lists,but hope I can get some helps here.:) I need a mod_rewrite rule,rewrite this url: http://abc.site.com/index.php?q1=v1 to: http://www.site.com/index.php?q1=v1&domain=abc I applicated this rule: RewriteEngine on RewriteRule ^/(.+)$ http://www

Re: Could someone help me with this source code?

2007-01-22 Thread Tom Phoenix
On 1/22/07, Caduceus <[EMAIL PROTECTED]> wrote: What I want to know is would this unix perl script work in windows TIA What happened when you tried it? There's good information on Perl portability issues in the perlport manpage. Good luck with it! --Tom Phoenix Stonehenge Perl Training --

Re: Could someone help me with this source code?

2007-01-22 Thread Caduceus
""Tom Phoenix"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 1/20/07, Caduceus <[EMAIL PROTECTED]> wrote: > >> I'm trying to run this perl script called "salter" on activestates >> komodo. >> I hope to use it with Mozilla Thunderbird. I've read Learning Perl, >> another >>

Re: Could someone help me with this source code?

2007-01-21 Thread Tom Phoenix
On 1/20/07, Caduceus <[EMAIL PROTECTED]> wrote: I'm trying to run this perl script called "salter" on activestates komodo. I hope to use it with Mozilla Thunderbird. I've read Learning Perl, another perl book, went to perl.com, perl.org, pm.org, and cpan.com but nothing seems to help. I will s

Could someone help me with this source code?

2007-01-21 Thread Caduceus
Hi: I'm trying to run this perl script called "salter" on activestates komodo. I hope to use it with Mozilla Thunderbird. I've read Learning Perl, another perl book, went to perl.com, perl.org, pm.org, and cpan.com but nothing seems to help. I will show you the script. Any help will be apprecia

Re: Who can help me to explain the reason? about regex `m' modifier.

2006-11-28 Thread Tom Phoenix
On 11/27/06, flw <[EMAIL PROTECTED]> wrote: $ perl -e '$_="a11\nb22\nc33\n"; print $_, "-"x15, "\n";s/^a.*^b.*/x/m; print' $ perl -e '$_="a11\nb22\nc33\n"; print $_, "-"x15, "\n";s/^a.*^b.*/x\n/ms; print' Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [

  1   2   3   >