Howdy List!
I noticed in the source code for the File::Slurp module that it does
'use strict;' and then in sub error {} it calls a function like so :
$func->($err_msg);
I was curious as to how that is possible without using "no strict
'subs';" or "refs" or something , and have it not cause an e
JupiterHost.Net wrote:
Howdy List!
I noticed in the source code for the File::Slurp module that it does
'use strict;' and then in sub error {} it calls a function like so :
$func->($err_msg);
I was curious as to how that is possible without using "no strict
'subs
In this case, $func holds a "hard reference", not a "soft reference".
The strict pragma only blocks the latter.
Here's a simple example:
sub howdy { print "Howdy!\n"; }
my $func = \&howdy;# hard reference
$func->();# fine, even with strictures
$func = 'howdy';# soft referen
$xid = param('xid') if param('xid') =~ m/^\d+$/ || '';
But I know that that is not right, what am I missing?
I could do the ? : ; dance but I'm not sure 'my' would stay in the scope
I need it in.
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PR
James Edward Gray II wrote:
On Mar 20, 2004, at 3:10 PM, JupiterHost.Net wrote:
Howdy,
I'm looking to have a one liner version of this:
Why? Do you win a cookie if you do it in one line? ;)
Not so much a cookie as some sugar :)
I win cookies at work for writing clear code, which
Paul Johnson wrote:
On Sat, Mar 20, 2004 at 03:10:18PM -0600, JupiterHost.Net wrote:
Howdy,
I'm looking to have a one liner version of this:
my $xid = '';
$xid = param('xid') if param('xid') =~ m/^\d+$/;
Basically, if the param is numeric then assign it to
John W. Krahn wrote:
"Jupiterhost.Net" wrote:
Howdy,
Hello,
I'm looking to have a one liner version of this:
my $xid = '';
$xid = param('xid') if param('xid') =~ m/^\d+$/;
Basically, if the param is numeric then assign it to $xid, other wise &
Hello List!
I was trying to figure out how to see the user the script/webserver is
running as. (Like Apache is 'nobody' or the owner 'foomonkey' perhaps
with SuExec enabled)
I looked in %ENV and didn't see it in there.
Any ideas?
TIA
Lee.M - JupiterHost.Net
ake foo.pl tell which ps it belongs to.
I suppose I can use the process Id in $$ in the parseing of ps output.
I was hoping for a builtin variable or module that would tell me :)
Any other ways besides parsing external program output?
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL
Bob Showalter wrote:
JupiterHost.Net wrote:
Hello List!
I was trying to figure out how to see the user the script/webserver is
running as. (Like Apache is 'nobody' or the owner 'foomonkey' perhaps
with SuExec enabled)
I looked in %ENV and didn't see it in there.
A
WC -Sx- Jones wrote:
JupiterHost.Net wrote:
problem is foo.pl can be run simultaneously by 2 different users so
I'm not sure how I'd be able to make foo.pl tell which ps it belongs to.
Not a problem - each will have it's own address space and PID.
The issue - and you haven
$dbh->selectall_arrayref($query)};
print "Your search returned $#records results.";
for(@records) {
...
}
HTH
Lee.M - JupiterHost.Net
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Smoot Carl-Mitchell wrote:
On Tue, 30 Mar 2004 16:00:41 -0600
"JupiterHost.Net" <[EMAIL PROTECTED]> wrote:
I'd rewrite the way you're doing it:
my @records = @{$dbh->selectall_arrayref($query)};
print "Your search returned $#records results.";
for(@r
ie "I hate extended characters"; }
Of course \w+ is letters , numbers, and underscores only, you will need
to add any other characters you want tot he regex but that should get
you started eh?
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
value of $_
sub myfunc {
my $func_arg = shift || ; # you wouldn't just do '|| $_;' would you?
...
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
[EMAIL PROTECTED] wrote:
Is there a module out there that I can use to parse a text line
and return the pieces that are enclosed in paren's?
You don't need a module for that just use regex's:
my @text_inside_parens = $string =~ m/\((.*)\)/g;
HTH
Lee.M - JupiterHost.Net
Thank you to all the responders! I love getting insights like this,
Yes I will not use that method (see subject), just love lots of points
of view to better my angle :)
Thanks again ;p
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
s a *little* better than `perldoc perlre` ;p)
Thanks for taking the time to do that example.
Lee.M - JupiterHost.Net
HTH,
Charles K. Clarkson
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
'((foo) bar)) (baz)',
'(foo bar)',) {
my @text_inside_parens = $string =~ m/\(([^(^).]*)\)/g;
print Dumper [EMAIL PROTECTED];
}
HTH
Lee.M - JupiterHost.Net
Thanks for taking the time to do that example.
Lee.M - JupiterHost.Net
HTH,
Charles K. Clarkson
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
player?
That's really up to your wants/needs. I'd use a MySQL db if I were doing
it.
Lee.M - JupiterHost.Net
Thanks
Lou
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
sub dohicky {
for(@_) {
if(ref($_) eq 'ARRAY') {
# process as an array ref
} elsif(ref($_) eq 'HASH') {
# process as a hash ref
} else {
# process non HASH/ARRAY REF
}
}
}
HTH
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
ng on the type of lock received?
IE
my $rc = flock(FH, LOCK_EX || LOCK_NB);
if($rc == 4) { warn "rats! Exclusive lock not granted, oh well..."; }
if(!$rc) { die "Could not get lock no how mr flock guy!"; }
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED
w yet.
I bet one of the smarter folks can help you with the reasons why :)
I'm starting out with one-liners and working my self up to an actual
script here. :>)
Cool! Perl rocks!
Thanks,
--Walt
HTH
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Smoot Carl-Mitchell wrote:
On Wed, 07 Apr 2004 13:51:03 -0500
"JupiterHost.Net" <[EMAIL PROTECTED]> wrote:
perldoc -f flock says
"If LOCK_NB is bitwise-or'ed with LOCK_SH or LOCK_EX then "flock"
will return immediately rather than blocking waiting for t
by doing:
for( @{ $dbh->selectall_arrayref($query) } ) {
my ($a_column,$b_column) = @{ $_ };
}
And all that without having to do the prepare, execute, getchrow_array
dance or worry about array names and simplifying the process of
processing the data :)
HTH
Lee.M - JupiterHost.Net
an
Smoot Carl-Mitchell wrote:
On Wed, 07 Apr 2004 14:50:54 -0500
"JupiterHost.Net" <[EMAIL PROTECTED]> wrote:
So flock(FH, LOCK_EX | LOCK_NB) then?
Yes.
So:
my $rc = flock(FH, LOCK_EX | LOCK_NB);
if($rc == 0) { warn "rats! Exclusive lock not granted, oh well...";
}
or do a typeglob:
sub foo { return "Howdy $_[0]"; }
*bar = \&foo;
or another way ??
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
david wrote:
Jupiterhost.Net wrote:
Hello list,
I was looking into the best way (and for what reasons) you'd create an
"alais" function.
For example:
If you want foo() and bar() to be able to be used interchangeably would
it be best to do:
sub foo { return "Howd
goto() just kind of uses the current @_ if I remeber right, correct?
Not just that. If all you wanted was to call foo with the current @_
youd write it like this:
sub bar { &foo; }
The
goto &foo;
does more. It replaces bar() by foo() in call stack. So if foo()
calls caller() or croaks() it
that's one feature of goto &foo and another has to do with transfering the
current call to another so caller is fooled to believe the function is
actually called directly
Excellent, thansk for the info David!
I'll have to perldoc -f goto since
I'm not realy familiar with it and its own issues
Hello,
I have DBI for 5.8.1 but not 5.8.0 (don't ask me why not ;p)
How can I install DBI and tell it to be installed in the 5.8.0 @INC
instead of 5.8.1's @INC?
perl -MCPAN -e '??? 5.8.0;install Bundle::DBI;'
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [
JupiterHost.Net wrote:
Hello,
I have DBI for 5.8.1 but not 5.8.0 (don't ask me why not ;p)
How can I install DBI and tell it to be installed in the 5.8.0 @INC
instead of 5.8.1's @INC?
perl -MCPAN -e '??? 5.8.0;install Bundle::DBI;'
I'm an idiot :
perl5.8.0 -MCPA
t if it was
never opened? How can I check that?
# any others,
}
TIA
Lee.M- JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
t the "refernce count to zero" here in one line regardless of ref type
}
If that thing happens to be an object, the object is destructed. See
perlobj for more about objects."
http://danconia.org
Thanks for the info :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Still not convinced you need any such idiom...
I'm not either, but they are not, believe it or not, "multiple
executions of a non-persistent script" they are multiple executions
of a persistent script that remains persistent between executions.
Its hard to image but take a look at this (and
Wiggins d Anconia wrote:
Still not convinced you need any such idiom...
I'm not either, but they are not, believe it or not, "multiple
executions of a non-persistent script" they are multiple executions
of a persistent script that remains persistent between executions.
Its hard to image b
Very cool!
Ok, well you think that might have helped to state in the first place,
especially when posting to a beginners list?
Sorry I didn't mean to offend anyone, I felt it was irrelevant to the
question. (IE - How do I vacuum my car instead of How would I vacuum a
blue car?)
I simply was t
david wrote:
Jupiterhost.Net wrote:
Ok, well you think that might have helped to state in the first place,
especially when posting to a beginners list?
Sorry I didn't mean to offend anyone, I felt it was irrelevant to the
question. (IE - How do I vacuum my car instead of How would I vac
Yes it is a bit confusing :)
hence all the tension..., my fault I apologize
The original idea was this:
I have a few items, $foo, @bar, %baz, and FH (via open())
I could (and yes, probably should ;p ) do:
undef $foo;
undef @bar;
undef %baz;
close FH;
What I'd like to do is accomplish tha
for(@array) {
print "Number $ix is $_\n";
$ix++;
}
HTH
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Andrew Gaffney wrote:
Charles K. Clarkson wrote:
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
: : I have code that uses a 'foreach(@array) {}' to loop
: through an array. I now need to be able to get the
: array index inside of that. I know I could switch to
: a 'for($loopvar=0;$loopvar<@array;$lo
n"; }
else { print "What did you choose?\n"; }
} else {
print "you have not chosen the very special ability!\n";
}
or:
my $switch = $ARGV[0] || '';
now it is initialized :)
and you can do what you did before just use $switch instead of $ARGV[0]
HTH
Lee.M -
deny wrote:
good afternoon
i use sendmail to send mail with a script perl
i receive this mail in /var/spool/clientmqueue
but not in my mailbox mozilla
here is the line in the script perl
open(MAIL, "|/usr/sbin/sendmail [EMAIL PROTECTED]");
piping to a program is very unreliable. for instance
-
ipt and not limit
it to the package?
After I check that the supplied module name is a valid looking module name:
my $e = @_ ? qq(use $m qw(@_);) : qq(use $m;);
eval $e;
then I return true if !$@ false if not
Like I said it works great id I call it inside the package..
print "-$e-\n";
t to chekc and see if a module and the items
chosen for export are available and if so import them in to the calling
name space and if not handle $@ however you want...
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
WC -Sx- Jones wrote:
JupiterHost.Net wrote:
Will work whether I do the require or use way
require doesn't let you specify what to EXPORT though which is one of
the goals of this funtion...
use does import the module's name *and* does the EXPORT symbols also
*if* its cal
Wiggins d'Anconia wrote:
JupiterHost.Net wrote:
WC -Sx- Jones wrote:
JupiterHost.Net wrote:
Will work whether I do the require or use way
require doesn't let you specify what to EXPORT though which is one
of the goals of this funtion...
use does import the module's name
uot;
Works like a charm! Thanks for the input everyone I really appreciate it :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
e to start ?
Try the Tk Modules or another one listed at
http://search.cpan.org/modlist/User_Interfaces
HTH :)
Lee.M - JupiterHost.Net
Thank you
Regards,
Nicolas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <ht
eone has a pipe or backtick?
maybe s/\W/_/g; do what you want more thouroughly (and readably)?
HTH
Lee.M - JupiterHost.Net
Thanks in advance,
Damon
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
my $safe = $attach_name;
$safe =~ s/[^\w\s\-\.]/_/g;
That won't help. If $attach_name is tainted, $safe will still be tainted.
Oops, I wasn't;t even thinking -t, duh! :) I was looking at the regex and
the " replace any unsafe characters with underscores" part, sorry :)
Here's how to do it:
#
d with the host (IE think cPanel) (and only after ruling out an
existing Perl version ;p). Anything I am responsible for making sure is
working well and doing its job I create in Perl...
Just my .02
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
g sure is
working well and doing its job I create in Perl...
Just my .02
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Wiggins d Anconia wrote:
[EMAIL PROTECTED] wrote:
Why would one prefer PHP over PERL, or vice, versa? I'm guessing
PERL has more functionaltiy and is more robust. What are the technical
arguments for one over the other?
JP
Perl IMHO is a SysAdmin language and PHP is and more or less always
John Pretti wrote:
All,
Howdy,
I appreciate all the help with file uploading. I have written a basic script
similar to the file upload sample at perlmonks.com. I have noticed that it
is written very loosely so I am trying to build in additional security. Some
of the things I would like help un
; # or your long running code here ...
print "$now\n"; # Sat Apr 24 00:57:06 2004
print $job->error if !$job->status;
$job->stop;
sleep(3);
print "$now\n"; # still Sat Apr 24 00:57:06 2004 because we stopped it
Anything even remotely like what I'm describing or
that I
haven't defined 'tag'?
Thanks from a PERL newbie,
Ben
np :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
e
perldoc perlref
HTH
Lee.M - JupiterHost.Net
Thanks,
Ben
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
d
$stuff = "hello";
shoudl be:
$stuff = 'hello';
etc
$str = CGI::header() . "hello" . $v;
woudl become
$str = CGI::header(),"hello", $v;
that sort of thing...
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
Ricardo SIGNES wrote:
* "JupiterHost.Net" <[EMAIL PROTECTED]> [2004-05-13T11:35:58]
Bob Showalter wrote:
for instance:
$newvariable = "$howdy";
should be:
$newvariable = $howdy;
That's not an appropriate optimization. Perl objects can overload
stringificatio
Jeff 'japhy' Pinyan wrote:
The lesson to learn is:
Premature optimization is the root of all evil.
Got ya ;p
http://en.wikipedia.org/wiki/Optimization_(computer_science)
Optimization (computer science
From Wikipedia, the free encyclopedia.
(Wikipedia does not have an article on this topi
Jean-Sébastien Guay wrote:
http://en.wikipedia.org/wiki/Optimization_(computer_science)
Optimization (computer science
From Wikipedia, the free encyclopedia.
(Wikipedia does not have an article on this topic yet. To start the
article, click Edit this page.)
?? :( I was wanting to read it.
mp;
Thanks!
np, HTH
Lee.M - JupiterHost.Net
Cheers,
Ben
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
zentara wrote:
On Wed, 05 May 2004 11:38:33 -0500, [EMAIL PROTECTED]
(Jupiterhost.Net) wrote:
Hello list,
To day I am trying to figure out the best way to send a hash to a socket
and have the receiver be able to use it as a hash.
The best way I've done so far is to Data::Dumper the hash
Wiggins d Anconia wrote:
On Wed, 05 May 2004 11:38:33 -0500, [EMAIL PROTECTED]
(Jupiterhost.Net) wrote:
Hello list,
To day I am trying to figure out the best way to send a hash to a socket
and have the receiver be able to use it as a hash.
The best way I've done so far is to Data::D
WC -Sx- Jones wrote:
Why do Perl programmers want to re-invent the wheel?
JupiterHost.Net wrote:
Assume I have a script that will run for 10 seconds.
Is it possible to have a function executed every 2 seconds?
I know it sounds weird but how would one go about something like that?
http
Thanks Wiggins and Scott for the info. I'll take a gander at the info
you pointed out.
I agree its probably over kill but I was curious about it simply for
grins :) So I'll use your references and see what I can figure out...
Thanks
Lee.M - JupiterHost.Net
--
To unsubscribe, e-ma
[EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
There are 4 ways to do what you want. The closest is probably 'do'
perldoc -f do
I would recommend the module approach as has already been suggested:
perldoc -f use
perldoc -f require
So far, "do" is looking like the be
$a = $main::ARGV[1];
$b = $main::ARGV[2];
$c = function($a,$b);
..
So, having to use $main:: is really an ugly and dangerous solution, and
hence why I really don't like the "use" or "require" solutions. "do"
Why is using main:: dangerous?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
]/-/g 2100840/s8%5%--
HTH :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
back?
Would I have to accept() and recv() right after I send()?
How about accept() and recv() when I havn't entered anything where/how
would that go?
Any pointers would be most appreciated :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional c
What module is it perhaps we can help a bit more if we had more details :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
to executre their own queries to get your
sensitive data or delete your data...
$sth = $dbh->prepare($chestie);
$sth->execute;
$mes = 1;
$dbh->disconnect;
}
}
else{
$mes = 2;
e expecting...
If you want it to be a hash ref you need
my $ModelPath = { ... };
and if you want it to be a hash you'd need to use () instead of {}
Just a little observation :)
Lee.M - JupiterHost.Net
But by doing so I am not getting the values for the respective keys.
--
To unsubscribe, e
way to do that. -IE hashtostring() and stringtohash()-
I can't use refs of course because the server will receive the text
HASH from the client and that wouldn't be too useful in the server.
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
cript.pl" correct?
If not how do you do that?
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Tim Johnson wrote:
See answers below.
Thanks Tim!
-Original Message-
From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 05, 2004 12:30 PM
To: [EMAIL PROTECTED]
Subject: Quick Perl on Windows Newbie Questions
Hello ActiveState ActivePerl users (any on this list?) :)
I
oo.pm ?
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Jeff 'japhy' Pinyan wrote:
On May 16, JupiterHost.Net said:
So the first question is:
To create the tar.gz file needed for upload to cpan I simply tar/gz
ify the NewModule/ directory, correct?
No.
h2xs ... Foo::Bar
cd Foo/Bar
# make the module
perl Makefile.PL
make tardist
/\/)?[\/\w\.\-]+)\"/ig;
HTH
Lee.M - JupiterHost.Net
How do I pull just the 'here_kitty' part?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Wiggins d Anconia wrote:
Jason Dusek wrote:
Hi Everyone,
Hello,
What is good way to pull the href from a link in html? If I have links
like:
meow woof moo bark bahh meow
bahh moo bark
There's are modules that help you do it, but this may work for what you
need:
my @href = $html =~ m/href\=\"
same? Any help in this regard is welcome.
I'm not sure what the sampling stuff is, I'm assuming audio? Either way
I'd check out search.cpan.org to look for audio modules.
HTH :)
Lee.M - JupiterHost.Net
Thanks
Regards
Guruguhan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additio
Randy W. Sims wrote:
JupiterHost.Net wrote:
Jeff 'japhy' Pinyan wrote:
On May 16, JupiterHost.Net said:
So the first question is:
To create the tar.gz file needed for upload to cpan I simply tar/gz
ify the NewModule/ directory, correct?
No.
h2xs ... Foo::Bar
cd Foo/Bar
# make
'sm:a',
and I need to extract the information contained by ''
and '' pair and the tags too, how should I proceed ?
I recommend trying an XML parsing module from search.cpan.org
HTH :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Hello group!
Anyone have any idea of a mailing list or more resources about embedding
Perl in C like is discussed here:
http://www-h.eng.cam.ac.uk/help/mjg17/perldoc/pod/perlembed.html)
TIA
Lee.M -JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
Jose Alves de Castro wrote:
For a list of lists, you might want to try http://lists.perl.org/
First place I went and none of them seemd to be about it :)
On Thu, 2004-05-20 at 18:58, JupiterHost.Net wrote:
Hello group!
Anyone have any idea of a mailing list or more resources about embedding
Perl
-$0-\n);", TRUE);
perl_destruct(my_perl);
perl_free(my_perl);
}
So does anyone have any insigth as to why it flops and/or how to set $0
with another value in those examples?
TIA
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Just a note: I also tried $main::0 as well as $0
(as in
perl -e '$0 = "foo";print "$0\n";'
perl -e '$main::0 = "foo";print "$0\n";')
after I used caller() to make sure it was in main::.
Any ideas?
JupiterHost.Net wrote:
Hello group!
Ma
Just a note: I also tried $main::0 as well as $0
(as in
perl -e '$0 = "foo";print "$0\n";'
perl -e '$main::0 = "foo";print "$0\n";')
after I used caller() to make sure it was in main::.
Any ideas?
JupiterHost.Net wrote:
Hello group!
Ma
nt to check out Data::Page and/or Data::Pageset
HTH:)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
zentara wrote:
On Fri, 21 May 2004 20:37:33 -0500, [EMAIL PROTECTED]
(Jupiterhost.Net) wrote:
Hello group!
Maybe a bit much for a beginners list (I looked and looked and couldn't
find any specific lists) but Perhaps a guru or two will know the answer :)
Have you tried the perl.inline
g is 6 characters long, so why the 5?
\d{5} says five digits
isn't there a insert regular expression?
HTH
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
e E string and write now it is
replacing ?
Try this:
while(<>) {
s/^E?\d{5}/eject\t0,0,0\t\n\1/; # the \1 is what you matched in the
first half
print;
}
thanks!
np :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT
eject\t0,0,0\t$1\n/;print; }'
I'm an idiot :)
To set $1 (or $2 or $3 etc) you have to use parens... duh!
Sorry its been a long day :)
That should do it :)
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://lear
@ejectapes);
also (its one of my things ;p) I single quoted .bak since it doesn't
need interpolated (if I'd not changed it to ann array I'd have also
recommended not quoting $ejectapes either: ... = ('.bak', $ejectapes)
Its a bit faster and cleaner looking :)
just my .02
ejectapes = qw(/usr/local/bin/perld/exports
/foobar/tapes /baz/wal/tapes);
It would only loop throught the first one since that's the only one
you're using :)
HTH
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTEC
)ing ;p) Try this:
for(@check_vip_ports) {
print "\$_ is $_";
}
# just use $_ instead of $token
# or if you *really* want to use $token:
for my $token(@check_vip_ports) {
print "\$token is $token";
}
You may want to
perldoc -f pop
perldoc perlop
perldoc -f glob
HTH :)
Lee.M
r way, and if you get stuck just
post back here your code and the problem and you'll have it up and
running in no time :)
HTH
Lee.M - JupiterHost.Net
cheers
barbara
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.per
it would only return a list of directories
not a list of all the files
HTH
Lee.M - JupiterHost.Net
Thanks,
Melis
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
1 - 100 of 725 matches
Mail list logo