how to quick print a series of *

2012-04-23 Thread lina
Hi, suppose I wish to print 20 * seems print *{20} not work. Thanks ahead for your sugestions, Best regards, -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

RE: how to quick print a series of *

2012-04-23 Thread Jack Maney
23, 2012 10:45 AM To: beginners@perl.org Subject: how to quick print a series of * Hi, suppose I wish to print 20 * seems print *{20} not work. Thanks ahead for your sugestions, Best regards, -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail

Re: how to quick print a series of *

2012-04-23 Thread Shlomi Fish
Hello lina, On Mon, 23 Apr 2012 23:45:03 +0800 lina lina.lastn...@gmail.com wrote: Hi, suppose I wish to print 20 * seems print *{20} not work. Use the x operator (the repeat operator): shlomif@telaviv1:~$ cat Test.pl #!/usr/bin/perl use strict; use warnings; print +('*' x 20),

quick question

2010-03-19 Thread Chris Knipe
Hi, I was just wondering, when we talk about integers specifically, what's the difference between: my $foo = 1; my $bar = 1; and my ($foo, $bar) = 1 I am getting more and more occurances where when I use the later as above, $bar would not have a defined value... I'm not quite sure I

Re: quick question

2010-03-19 Thread trapd00r
On 19/03/10 13:19 +0200, Chris Knipe wrote: my ($foo, $bar) = 1 I am getting more and more occurances where when I use the later as above, $bar would not have a defined value... I'm not quite sure I understand why. Does; my ($foo,$bar) = 1 x 2; do what you want? -- To unsubscribe, e-mail:

Re: quick question

2010-03-19 Thread Philip Potter
On 19 March 2010 11:45, trapd...@trapd00r.se wrote: On 19/03/10 13:19 +0200, Chris Knipe wrote: my ($foo, $bar) = 1 I am getting more and more occurances where when I use the later as above, $bar would not have a defined value...  I'm not quite sure I understand why. Does; my

Re: quick question

2010-03-19 Thread Shlomi Fish
On Friday 19 Mar 2010 13:45:31 trapd...@trapd00r.se wrote: On 19/03/10 13:19 +0200, Chris Knipe wrote: my ($foo, $bar) = 1 I am getting more and more occurances where when I use the later as above, $bar would not have a defined value... I'm not quite sure I understand why. Does; my

Re: quick question

2010-03-19 Thread Shawn H Corey
Chris Knipe wrote: Hi, I was just wondering, when we talk about integers specifically, what's the difference between: my $foo = 1; my $bar = 1; and my ($foo, $bar) = 1 I am getting more and more occurances where when I use the later as above, $bar would not have a defined value...

Re: quick question

2010-03-19 Thread John W. Krahn
Chris Knipe wrote: Hi, Hello, I was just wondering, when we talk about integers specifically, Why integers specifically? The same applies for any scalar value. what's the difference between: my $foo = 1; my $bar = 1; and my ($foo, $bar) = 1 I am getting more and more occurances where

Looking for a quick, easy way to time system process to the sub-second

2009-04-10 Thread Dan Huston
Greetings All: I have a script that I am using to run a series of sql statements against two different Oracle databases to compare performance based on a request from our DBAs. I am currently using code like this: $time1 = time(); $result = `$this_comm`; $time2 = time(); $time_tot =

Re: Looking for a quick, easy way to time system process to the sub-second

2009-04-10 Thread John W. Krahn
Dan Huston wrote: Greetings All: Hello, I have a script that I am using to run a series of sql statements against two different Oracle databases to compare performance based on a request from our DBAs. I am currently using code like this: $time1 = time(); $result = `$this_comm`;

RE: Looking for a quick, easy way to time system process to the sub-second

2009-04-10 Thread Wagner, David --- Senior Programmer Analyst --- CFS
-Original Message- From: Dan Huston [mailto:dan.hus...@domail.maricopa.edu] Sent: Friday, April 10, 2009 11:24 To: beginners@perl.org Subject: Looking for a quick, easy way to time system process to the sub-second Greetings All: I have a script that I am using to run a series

quick regex question

2009-03-25 Thread Rick Bragg
I need a quick regex to strip out the following: example: change remove-all-this (Keep This) into just Keep This something like: s/ beginning of line up to and including the first ( //g s/ starting from and including first ) to end of line //g Can anyone help with this quick line or 2? Thanks

Re: quick regex question

2009-03-25 Thread Rodrick Brown
On Wed, Mar 25, 2009 at 12:00 PM, Rick Bragg li...@gmnet.net wrote: I need a quick regex to strip out the following: example: change remove-all-this (Keep This) into just Keep This $s =~ s/.*\((.*)\)/$1/; something like: s/ beginning of line up to and including the first ( //g s

Re: quick regex question

2009-03-25 Thread Telemachus
On Wed Mar 25 2009 @ 12:19, Rodrick Brown wrote: On Wed, Mar 25, 2009 at 12:00 PM, Rick Bragg li...@gmnet.net wrote: I need a quick regex to strip out the following: example: change remove-all-this (Keep This) into just Keep This $s =~ s/.*\((.*)\)/$1/; something like: s

Re: quick regex question

2009-03-25 Thread Gunnar Hjalmarsson
Rick Bragg wrote: I need a quick regex to strip out the following: Never heard of that. What is a quick regex? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h

Re: quick regex question

2009-03-25 Thread Chas. Owens
On Wed, Mar 25, 2009 at 13:21, Telemachus telemac...@arpinum.org wrote: snip    my $string2 = 'remove-all-this (Keep this) remove this too';    $string2 =~ s/.*\((.*)\)/$1/; snip If $string2 may contain more than one pair of parentheses, you will want to say $string2 =~ s/.*\((.*?)\)/$1/; or

Re: quick regex question

2009-03-25 Thread Telemachus
On Wed Mar 25 2009 @ 3:10, Chas. Owens wrote: On Wed, Mar 25, 2009 at 13:21, Telemachus telemac...@arpinum.org wrote: snip    my $string2 = 'remove-all-this (Keep this) remove this too';    $string2 =~ s/.*\((.*)\)/$1/; snip If $string2 may contain more than one pair of parentheses,

quick regex question

2009-01-09 Thread Chris Knipe
Hi, I have two lines (well, 1 line is headers, then there follows a range of data)... # INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes -63...@18mbps 9Mbps 2h2m38s

Re: quick regex question

2009-01-09 Thread Paolo Gianrossi
Chris Knipe ha scritto: Hi, I have two lines (well, 1 line is headers, then there follows a range of data)... # INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes

RE: quick regex question

2009-01-09 Thread Chris Knipe
# INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes -63...@18mbps 9Mbps 2h2m38s I'm looking for a foreach my $Line (@Output) { my ($interface,

Re: quick regex question

2009-01-09 Thread John W. Krahn
Chris Knipe wrote: Hi, Hello, I have two lines (well, 1 line is headers, then there follows a range of data)... # INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes

Re: quick regex question

2009-01-09 Thread Paolo Gianrossi
Chris Knipe ha scritto: # INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes -63...@18mbps 9Mbps 2h2m38s I'm looking for a foreach my $Line (@Output) { my

Re: quick regex question

2009-01-09 Thread Gunnar Hjalmarsson
Chris Knipe wrote: Paolo Gianrossi wrote: Could maybe a simple split(/\s+/ $Line, 7); work? Almost, but we're not *quite* there yet... ... I'm not sure why I am required to have 9 fields in the split to get the values now... It appears from your initial post as if there is a leading space

Re: quick regex question

2009-01-09 Thread Gunnar Hjalmarsson
Chris Knipe wrote: (Really just need to get $interface name and $signal)... Then you may prefer a list slice. my ($interface, $signal) = (split ' ', $Line)[1,5]; -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail:

Quick Net::SSH::Perl question

2006-10-27 Thread Michael Alipio
Hi, My program looks like this: #!/usr/local/bin/perl use warnings; use strict; use Net::SSH::Perl; my $host = '192.168.1.1'; my $user = 'user'; my $pass = 'password'; my $ssh = Net::SSH::Perl-new($host); $ssh-login($user, $pass); $ssh-shell; It spawns a shell successfully but takes too long

Re: Quick Net::SSH::Perl question

2006-10-27 Thread Rob Dixon
Michael Alipio wrote: Hi, My program looks like this: #!/usr/local/bin/perl use warnings; use strict; use Net::SSH::Perl; my $host = '192.168.1.1'; my $user = 'user'; my $pass = 'password'; my $ssh = Net::SSH::Perl-new($host); $ssh-login($user, $pass); $ssh-shell; It spawns a shell

Quick question on code factoring

2006-09-11 Thread Jen Spinney
Hello. It's obvious that I need to factor the follow code, but I'm not sure how to go about it syntax wise (I read perldoc perlsyn, but I'm still not sure of the best way). if ($color eq $B_COLOR) { $id = $c-createLine ($x[0], $time1, $x[1], $time1,

Re: Quick question on code factoring

2006-09-11 Thread Chad Perrin
On Mon, Sep 11, 2006 at 08:02:36PM -0400, Jen Spinney wrote: The only difference between the blocks is two additional lines ($x[2]...) in the else block. I mean, I know I could write a subroutine that I could call inside the parentheses that would return a string (either empty or containing

Re: Quick question on code factoring

2006-09-11 Thread John W. Krahn
Jen Spinney wrote: Hello. It's obvious that I need to factor the follow code, but I'm not sure how to go about it syntax wise (I read perldoc perlsyn, but I'm still not sure of the best way). if ($color eq $B_COLOR) { $id = $c-createLine ($x[0], $time1, $x[1],

Re: Quick question on code factoring

2006-09-11 Thread Jen Spinney
with an unless. Chad - Thanks for the quick reply. How do I embed the unless inside function call parentheses? I've muddled around with the following, but it's not right. (I'm probably embarrassing myself by showing I tried it this way... :) ) ($x[0], $time1, $x[1], $time1, $x[2], $time2, unless

Re: Quick question on code factoring

2006-09-11 Thread Jen Spinney
On 9/11/06, John W. Krahn [EMAIL PROTECTED] wrote: Jen Spinney wrote: Hello. It's obvious that I need to factor the follow code, but I'm not sure how to go about it syntax wise (I read perldoc perlsyn, but I'm still not sure of the best way). if ($color eq $B_COLOR) { $id =

Re: Quick question on code factoring

2006-09-11 Thread chen li
It looks like you may want something like this: $id = $c-createLine( $x[0], $time1, $x[1], $time1, $color eq $B_COLOR ? () : ( $x[2], $time2, $x[3], $time2, ), -arrow = 'last', -fill

Re: Quick question on code factoring

2006-09-11 Thread Chad Perrin
On Mon, Sep 11, 2006 at 05:37:15PM -0700, chen li wrote: What is the usage for ? () : and where can I find more about it? perldoc perlop -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] This sig for rent: a Signify v1.14 production from http://www.debian.org/ -- To unsubscribe,

[EMAIL PROTECTED]: Re: Quick question on code factoring]

2006-09-11 Thread Chad Perrin
: Re: Quick question on code factoring On Mon, Sep 11, 2006 at 08:28:15PM -0400, Jen Spinney wrote: Chad - Thanks for the quick reply. How do I embed the unless inside function call parentheses? I've muddled around with the following, but it's not right. (I'm probably embarrassing myself

Quick regex question

2006-01-24 Thread Chris
Hi list, I am not sure if there is a proper name for this but was having some difficulty searching for it. Basically I have data in a file that is between two different characters, for example: # data data data data data data * # more dataaa mor * Basically I want to slurp that file in,

Re: Quick regex question

2006-01-24 Thread Chas Owens
On 1/24/06, Chris [EMAIL PROTECTED] wrote: Hi list, I am not sure if there is a proper name for this but was having some difficulty searching for it. Basically I have data in a file that is between two different characters, for example: # data data data data data data * # more dataaa

Re: Quick regex question

2006-01-24 Thread John Doe
Chris am Dienstag, 24. Januar 2006 22.35: Hi list, I am not sure if there is a proper name for this but was having some difficulty searching for it. Basically I have data in a file that is between two different characters, for example: # data data data data data data * # more dataaa

Re: Quick regex question

2006-01-24 Thread John W. Krahn
Chris wrote: Hi list, Hello, I am not sure if there is a proper name for this but was having some difficulty searching for it. Basically I have data in a file that is between two different characters, for example: # data data data data data data * # more dataaa mor *

quick regex question

2005-03-31 Thread Ramprasad A Padmanabhan
Hi, I want to run a substitution for all instances of _ with . after '@' in a string but _ before @ should not be touched. eg $str = [EMAIL PROTECTED]; Should become [EMAIL PROTECTED] Any suggestions Thanks Ram -- Netcore

Re: quick regex question

2005-03-31 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: Hi, Hello, I want to run a substitution for all instances of _ with . after '@' in a string but _ before @ should not be touched. eg $str = [EMAIL PROTECTED]; Should become [EMAIL PROTECTED] $ perl -le' my $str = q/[EMAIL PROTECTED]/; $str =~ s/([EMAIL

Re: quick regex question

2005-03-31 Thread Offer Kaye
On Thu, 31 Mar 2005 02:08:22 -0800, John W. Krahn wrote: $ perl -le' my $str = q/[EMAIL PROTECTED]/; $str =~ s/([EMAIL PROTECTED])/($a = $1) =~ tr|_|.|; $a/e; print $str; ' [EMAIL PROTECTED] $ perl -le' my $str = q/[EMAIL PROTECTED]/; substr( $str, index $str, q/@/ ) =~ tr/_/./;

Re: quick regex question

2005-03-31 Thread Abhishek Dave
3:13 PM Subject: quick regex question Hi, I want to run a substitution for all instances of _ with . after '@' in a string but _ before @ should not be touched. eg $str = [EMAIL PROTECTED]; Should become [EMAIL PROTECTED] Any suggestions Thanks Ram

Re: quick regex question

2005-03-31 Thread John W. Krahn
Offer Kaye wrote: Here are 2 other methods, just for the heck of it :-) # Method 1 my $str = '[EMAIL PROTECTED]'; my ($part1,$part2) = split /@/, $str; $part2 =~ s/_/./g; $str = $part1.@.$part2; print $str\n; # Method 2 my $str = '[EMAIL PROTECTED]'; while ($str =~ m/(?=@).+?_/) { $str =~

Re: quick regex question

2005-03-31 Thread Jeff 'japhy' Pinyan
On Mar 31, Ramprasad A Padmanabhan said: $str = [EMAIL PROTECTED]; Should become [EMAIL PROTECTED] I'd use index() and substr(): if ((my $p = index($str, '@')) -1) { substr($str, $p) =~ tr/_/./ } -- Jeff japhy Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 %

Re: quick regex question

2005-03-31 Thread Offer Kaye
On Thu, 31 Mar 2005 12:16:21 -0800, John W. Krahn wrote: Using the same regular expression twice is redundant. 1 while $str =~ s/(?=\@)(.+?)_/$1./; Beautiful! But also a bit mind bending. I see code like this and I think - too clever. It's not easy, I think, to understand at once what this

Re: quick regex question

2005-03-31 Thread John W. Krahn
Offer Kaye wrote: On Thu, 31 Mar 2005 12:16:21 -0800, John W. Krahn wrote: And yet in your examples you use @ in double quoted strings four times without escaping it (hint: m// and s/// interpolate like double quoted strings.) Ah, but there is an important difference - in all the cases I wrote,

Re: quick regex question

2005-03-31 Thread Offer Kaye
as a variable name. Quick reality check for myself: $ perl -le' @a = qw/ a b c d /; print for @a' a b c d $ perl -le' @) = qw/ a b c d /; print for @)' @) Now all is well :-) But now I'm confused - if you knew of the above rule, why take me to task for not escaping the '@' sign in my code? Regards

Re: quick regex question

2005-03-31 Thread John W. Krahn
. Quick reality check for myself: $ perl -le' @a = qw/ a b c d /; print for @a' a b c d $ perl -le' @) = qw/ a b c d /; print for @)' @) Now all is well :-) But now I'm confused - if you knew of the above rule, why take me to task for not escaping the '@' sign in my code? Because I can. :-) No really

Quick table format question

2004-09-14 Thread Sean Davis
All, Slightly off-topic, but I have a script that dynamically generates a table. Within this outer table, I have in each cell another table with 1 row, with each cell having a background color and containing only nbsp entity. I would like to make each of these inner cells a fixed width,

Re: Quick table format question

2004-09-14 Thread Gunnar Hjalmarsson
Sean Davis wrote: Slightly off-topic, but I have a script that dynamically generates a table. Within this outer table, I have in each cell another table with 1 row, with each cell having a background color and containing only nbsp entity. I would like to make each of these inner cells a

Re: Quick table format question

2004-09-14 Thread Chris Devers
On Tue, 14 Sep 2004, Gunnar Hjalmarsson wrote: The width attribute for cells is deprecated. Try setting table width for the inner tables instead. Or, better still, learn how to do layout with CSS and stop using tables for everything except (as originally intended) tabular data. On a modern

Re: Quick table format question

2004-09-14 Thread Sean Davis
Thanks Chris and Gunnar. Setting the inner table width worked, but I can see that using CSS would offer significant benefits and I will need to migrate that direction at some point. It seems like the table version seems to work on many browsers--is the [envisioned] CSS solution also

Re: Quick table format question

2004-09-14 Thread Chris Devers
On Tue, 14 Sep 2004, Sean Davis wrote: Thanks Chris and Gunnar. Setting the inner table width worked, but I can see that using CSS would offer significant benefits and I will need to migrate that direction at some point. It seems like the table version seems to work on many browsers--is

Re: Quick table format question

2004-09-14 Thread Gunnar Hjalmarsson
Sean Davis wrote: It seems like the table version seems to work on many browsers--is the [envisioned] CSS solution also generally compatible across browsers these days? It seems that browser layout engines are still suboptimal for some particulars of CSS. It depends on what you mean by these

quick regex help plz.

2003-10-06 Thread Hotpop
I have input like this: HEADING1: This is the description lines. This is the description lines. This is the description lines. This is the description lines. HEADING2: This is the description lines. so and so... I have to format the HTML

Thanks and another quick Q, how to unconcatenate...

2003-09-04 Thread LoneWolf
Thanks for everyone's help with this one, I was stuck and knew I was missing something simple.. UGH. perldoc -q replace didn't turn me up with anything either, which was a bummer, but going off the code posted here I was able to do more with it. This is what I used:

RE: Thanks and another quick Q, how to unconcatenate...

2003-09-04 Thread Akens, Anthony
PM To: [EMAIL PROTECTED] Subject: Thanks and another quick Q, how to unconcatenate... Thanks for everyone's help with this one, I was stuck and knew I was missing something simple.. UGH. perldoc -q replace didn't turn me up with anything either, which was a bummer, but going off the code posted

Re: Thanks and another quick Q, how to unconcatenate...

2003-09-04 Thread John W. Krahn
Lonewolf wrote: Thanks for everyone's help with this one, I was stuck and knew I was missing something simple.. UGH. perldoc -q replace didn't turn me up with anything either, which was a bummer, but going off the code posted here I was able to do more with it. This is what I used:

RE: quick re help

2003-08-15 Thread Robert J Taylor
what is less awkward than [\s|\S] for 'match anything?' . Yes -.- Dot, period, point, et al, is the universal match something symbol. So, m'.*$' matches everthing on a line. If you want to match a period you can either escape it: \. or bracket it [.]. Escaping is better for

Re: quick re help

2003-08-14 Thread Janek Schleicher
[EMAIL PROTECTED] wrote at Wed, 13 Aug 2003 15:22:59 -0600: sub quickWrap { my $data = @_[0]; You shouldn't use an array slice where you mean to use a single array element. Thanks for catching that, I should have really seen that one. No, Perl should have seen it for you. You only

RE: quick re help

2003-08-14 Thread Jeff 'japhy' Pinyan
On Aug 14, Perry, Alan said: So, /[\s\S]/ would match a \n, while /./ would not. The equivalent of /[\s\S]/, using period notation, would be /[.\n]/ Not so much; the . in a character class matches just itself. -- Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI

Re: quick re help

2003-08-14 Thread James Edward Gray II
On Wednesday, August 13, 2003, at 04:22 PM, [EMAIL PROTECTED] wrote: Jeff 'Japhy' Pinyan wrote: On Aug 13, [EMAIL PROTECTED] said: my $wrap_at = @_ ? shift : 75; I like that. Just to add my two cents, I like: my $wrap_at = shift || 75; James Gray -- To unsubscribe, e-mail: [EMAIL

Re: quick re help

2003-08-14 Thread [EMAIL PROTECTED]
Jeff 'Japhy' Pinyan wrote: On Aug 13, [EMAIL PROTECTED] said: sub quickWrap { my $data = @_[0]; You shouldn't use an array slice where you mean to use a single array element. Thanks for catching that, I should have really seen that one.

RE: quick re help

2003-08-14 Thread Perry, Alan
Jeff 'japhy' Pinyan wrote: On Aug 14, Perry, Alan said: So, /[\s\S]/ would match a \n, while /./ would not. The equivalent of /[\s\S]/, using period notation, would be /[.\n]/ Not so much; the . in a character class matches just itself. You are correct, I forgot about that. You could use

RE: quick re help

2003-08-14 Thread Robert J Taylor
[EMAIL PROTECTED] inquired: This regex looks familiar. I'm going to suggest a big change in a bit. Oh, and [\s|\S], which could be [\s\S], is kind of awkward. what is less awkward than [\s|\S] for 'match anything?' . Yes -.- Dot, period, point, et al, is the universal match something

RE: quick re help

2003-08-14 Thread Perry, Alan
Robert J Taylor wrote: [EMAIL PROTECTED] inquired: This regex looks familiar. I'm going to suggest a big change in a bit. Oh, and [\s|\S], which could be [\s\S], is kind of awkward. what is less awkward than [\s|\S] for 'match anything?' . Yes -.- Dot, period, point, et al, is the

Re: quick re help

2003-08-14 Thread Jeff 'japhy' Pinyan
On Aug 13, [EMAIL PROTECTED] said: Jeff 'Japhy' Pinyan wrote: On Aug 13, [EMAIL PROTECTED] said: my $data = shift; my $wrap_at = @_ ? shift : 75; I like that. The simpler-looking my $wrap_at = shift || 75; has also been proposed. The only reason I didn't use that is because, in

quick re help

2003-08-14 Thread [EMAIL PROTECTED]
Hi everyone I am pretty new to regex's, so I was happy when my text wrapping expression worked - for the most part. It messes up when I need to wrap lines with \n that don't end in a space. If there is no space, it places last word on its own line before it should wrap. Otherwise it double

RE: Quick export question

2003-08-14 Thread Charles K. Clarkson
Dan Muey [EMAIL PROTECTED] wrote: : : I'm wanting to setup a module that will export whatever is in : @EXPORT (if anythign) and ':basic' : : IE I want : use Monkey; : To be identical to : use Monkey qw(:basic); Seems like you really need is a way to test this for yourself. Here's a

RE: Quick export question

2003-08-14 Thread Bob Showalter
Dan Muey wrote: I'm wanting to setup a module that will export whatever is in @EXPORT (if anythign) and ':basic' IE I want use Monkey; To be identical to use Monkey qw(:basic); So if I have this on the module which of 3 ways I'm trying to accoomplish that are valid (if any)?

Re: quick re help

2003-08-14 Thread Jeff 'japhy' Pinyan
On Aug 13, [EMAIL PROTECTED] said: It messes up when I need to wrap lines with \n that don't end in a space. If there is no space, it places last word on its own line before it should wrap. Otherwise it double \ns the line. sub quickWrap { my $data = @_[0]; You shouldn't use an array

RE: Quick export question

2003-08-11 Thread Dan Muey
I'm wanting to setup a module that will export whatever is in @EXPORT (if anythign) and ':basic' IE I want use Monkey; To be identical to use Monkey qw(:basic); So if I have this on the module which of 3 ways I'm trying to accoomplish that are valid (if any)?

RE: Quick export question

2003-08-08 Thread Dan Muey
I'm wanting to setup a module that will export whatever is in @EXPORT (if anythign) and ':basic' IE I want use Monkey; To be identical to use Monkey qw(:basic); So if I have this on the module which of 3 ways I'm trying to accoomplish that are valid (if any)? %EXPORT_TAGS = {

Quick export question

2003-08-08 Thread Dan Muey
I'm wanting to setup a module that will export whatever is in @EXPORT (if anythign) and ':basic' IE I want use Monkey; To be identical to use Monkey qw(:basic); So if I have this on the module which of 3 ways I'm trying to accoomplish that are valid (if any)? %EXPORT_TAGS = {

RE: Quick DBI connection

2003-08-04 Thread Dan Muey
So what I need to know I guess is: 1) in MYSuperModule.pm do I a) use DBI; b) sub DBI::db::myfunc {} or sub ???::Myfunc {} 2) What is the best way to do that without causing namespace problems? So answer a question with a question! Dan, you

Re: Quick DBI connection

2003-08-01 Thread Rob Dixon
Casey West wrote: It was Thursday, July 31, 2003 when Dan Muey took the soap box, saying: : If I do : : use DBI; : my $dbh = DBI-connect('DBI:mysql:localhost','user','pass'); : : To connect to the mysql driver the package name is actually DBI::db not DBI. : : My question is: is it always

RE: Quick DBI connection

2003-08-01 Thread Dan Muey
: To connect to the mysql driver the package name is actually DBI::db not DBI. : : My question is: is it always going to be DBI::db regardless of the driver? : I need ot know for some stuff I'm making that uses the name space of $dbh object. Yep. Casey West Good answer

RE: Quick DBI connection

2003-08-01 Thread Bob Showalter
Dan Muey wrote: To connect to the mysql driver the package name is actually DBI::db not DBI. My question is: is it always going to be DBI::db regardless of the driver? I need ot know for some stuff I'm making that uses the name space of $dbh object. Yep.

RE: Quick DBI connection

2003-08-01 Thread Dan Muey
Dan Muey wrote: To connect to the mysql driver the package name is actually DBI::db not DBI. My question is: is it always going to be DBI::db regardless of the driver? I need ot know for some stuff I'm making that uses the name space of $dbh object.

Quick DBI connection

2003-07-31 Thread Dan Muey
If I do use DBI; my $dbh = DBI-connect('DBI:mysql:localhost','user','pass'); To connect to the mysql driver the package name is actually DBI::db not DBI. My question is: is it always going to be DBI::db regardless of the driver? I need ot know for some stuff I'm making that uses the name space

Re: Quick DBI connection

2003-07-31 Thread Casey West
It was Thursday, July 31, 2003 when Dan Muey took the soap box, saying: : If I do : : use DBI; : my $dbh = DBI-connect('DBI:mysql:localhost','user','pass'); : : To connect to the mysql driver the package name is actually DBI::db not DBI. : : My question is: is it always going to be DBI::db

RE: Quick DBI connection

2003-07-31 Thread Dan Muey
It was Thursday, July 31, 2003 when Dan Muey took the soap box, saying: : If I do : : use DBI; : my $dbh = DBI-connect('DBI:mysql:localhost','user','pass'); : : To connect to the mysql driver the package name is actually DBI::db not DBI. : : My question is: is it always going to

quick question on internal data structure

2003-07-29 Thread Lodewijks, Jeroen
Hi all, I have a 2 questions about the internal representation of a hash or array. Consider this piece of code: 1) sub PassHash { my (%hash) = @_; $hash{$some_key} = 'test'; ... } PassHash(%hash); What happens internally? Will the whole contents of the hash be copied in memory?

RE: quick question on internal data structure

2003-07-29 Thread Marcos . Rebelo
] Sent: Tuesday, July 29, 2003 4:47 PM To: '[EMAIL PROTECTED]' Subject: quick question on internal data structure Hi all, I have a 2 questions about the internal representation of a hash or array. Consider this piece of code: 1) sub PassHash { my (%hash) = @_; $hash{$some_key} = 'test

Re: quick question on internal data structure

2003-07-29 Thread John W. Krahn
Jeroen Lodewijks wrote: Hi all, Hello, I have a 2 questions about the internal representation of a hash or array. Consider this piece of code: 1) sub PassHash { my (%hash) = @_; $hash{$some_key} = 'test'; ... } PassHash(%hash); What happens internally? perldoc

Re: quick question on internal data structure

2003-07-29 Thread Rob Dixon
Hi John. I may be misunderstanding you, but this doesn't look right to me. John W. Krahn wrote: Jeroen Lodewijks wrote: 1) sub PassHash { my (%hash) = @_; $hash{$some_key} = 'test'; ... } PassHash(%hash); What happens internally? perldoc perlsub Will

RE: Quick CGI query_string() question

2003-06-23 Thread Dan Muey
So if $q above is : hi=byelove=hateone=twoetc=etc Hmmm. Do you work for the State Department or something? Or the White House Press office? That was a good one I want to remove, say 'love', so it'd be: hi=byeone=twoetc=etc I know I could do a regex but I'd like a CGI way to do

Re: Quick CGI query_string() question

2003-06-21 Thread R. Joseph Newton
Dan Muey wrote: Hello list, I have a probably simple thing. I'd like to basically do: use CGI qw(:standard); my $q = query_string(); Except I need to remove two params from it: So if $q above is : hi=byelove=hateone=twoetc=etc Hmmm. Do you work for the State Department or something?

Quick CGI query_string() question

2003-06-19 Thread Dan Muey
Hello list, I have a probably simple thing. I'd like to basically do: use CGI qw(:standard); my $q = query_string(); Except I need to remove two params from it: So if $q above is : hi=byelove=hateone=twoetc=etc I want to remove, say 'love', so it'd be: hi=byeone=twoetc=etc I know I could do

Re: Quick CGI query_string() question

2003-06-19 Thread Casey West
It was Thursday, June 19, 2003 when Dan Muey took the soap box, saying: : Hello list, : : I have a probably simple thing. : : I'd like to basically do: : : use CGI qw(:standard); : my $q = query_string(); : : Except I need to remove two params from it: : : So if $q above is :

RE: Quick CGI query_string() question

2003-06-19 Thread Dan Muey
It was Thursday, June 19, 2003 when Dan Muey took the soap box, saying: : Hello list, : : I have a probably simple thing. : : I'd like to basically do: : : use CGI qw(:standard); : my $q = query_string(); : : Except I need to remove two params from it: : : So if $q above is :

RE: Is there a quick and easy way to indroduce random deletions

2003-03-13 Thread Aimal Pashtoonmal
Hi, Does anyone know how I can go about introducing a single random deletion. I have file containing blocks of alphabet each block with a uniq tag. I have passed this into a hash where the tags are the keys and values are the blocks. Is there a quick and easy way to randomly remove a single

Re: Is there a quick and easy way to indroduce random deletions

2003-03-13 Thread John W. Krahn
Aimal Pashtoonmal wrote: Hi, Hello, Does anyone know how I can go about introducing a single random deletion. I have file containing blocks of alphabet each block with a uniq tag. I have passed this into a hash where the tags are the keys and values are the blocks. Is there a quick

Re: Is there a quick and easy way to indroduce random deletions

2003-03-13 Thread Rob Dixon
Aimal Pashtoonmal wrote: Hi, Does anyone know how I can go about introducing a single random deletion. I have file containing blocks of alphabet each block with a uniq tag. I have passed this into a hash where the tags are the keys and values are the blocks. Is there a quick and easy way

Re: Is there a quick and easy way to indroduce random deletions

2003-03-13 Thread Aimal Pashtoonmal
containing blocks of alphabet each block with a uniq tag. I have passed this into a hash where the tags are the keys and values are the blocks. Is there a quick and easy way to randomly remove a single letter from each block. For exmple: QWERTYUIOPLKJHGFDSAZXCVBNM WAZWSXEDCRFVTGBYHNUJMIKLOP

Quick regex prob

2003-01-23 Thread Dan Muey
Hiya, I'm having a brain melt right now : I do this to match one word only. m/^(\w+)$/) What regex do I need to match multiple , unkown ammounts of words? Will this do it? Or is there a better way? m/^\w[\w*|\s*]\w$/ I know there is but like Isaid my brain stopped for luunch a while ago.

Re: Quick regex prob

2003-01-23 Thread Rob Dixon
Dan Muey wrote: Hiya, I'm having a brain melt right now : I do this to match one word only. m/^(\w+)$/) That matches an entire line which is just a string of 'word' characters ( A-Z, a-z, 0-9, and underscore ). What regex do I need to match multiple , unkown ammounts of words? Will this do

RE: Quick regex prob

2003-01-23 Thread Dan Muey
Dan Muey wrote: Hiya, I'm having a brain melt right now : I do this to match one word only. m/^(\w+)$/) That matches an entire line which is just a string of 'word' characters ( A-Z, a-z, 0-9, and underscore ). What regex do I need to match multiple , unkown ammounts of words?

RE: Quick regex prob

2003-01-23 Thread Liebert, Sander
PM To: Rob Dixon; [EMAIL PROTECTED] Subject: RE: Quick regex prob Dan Muey wrote: Hiya, I'm having a brain melt right now : I do this to match one word only. m/^(\w+)$/) That matches an entire line which is just a string of 'word' characters ( A-Z, a-z, 0-9, and underscore

  1   2   >