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/
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
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),
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
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:
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
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
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...
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
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 =
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`;
-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
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
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
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
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
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
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,
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
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
# 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,
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
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
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
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:
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
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
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,
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
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],
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
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 =
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
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,
: 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
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,
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
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
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 *
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
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
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/_/./;
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
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 =~
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 %
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
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,
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
.
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
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,
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
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
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
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
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
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 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:
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
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:
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
[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
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
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
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.
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
[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
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
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
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
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
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)?
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
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)?
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 = {
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 = {
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
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
: 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
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.
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.
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
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
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
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?
]
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
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
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
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
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?
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
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 :
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 :
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
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
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
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
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.
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
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?
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 - 100 of 199 matches
Mail list logo