You don't need Microsoft Visual Studio to install perl modules. I will
go on a limb and assume here you're thinking of using MS Visual C
compiler to compile perl and subsequent c modules, but even that's not
necessary, as you could use MinGW
On 1 June 2011 11:26, Shlomi Fish shlo...@iglu.org.il
To explain myself, I was actually referring to building perl from
source on Win32 rather than using a distro.
As for me, I use(d) strawberry simply because I found the ppa system
too cumbersome when I tried to combine it with cpan, and once perl
5.10 came out, it started to drag back, so I
On Mon, Apr 11, 2011 at 04:05:31AM -0700, prashant kaushal wrote:
Hi Di,
Yesterday i tried a Hello world program in perl using cgi script on a
windows platform. The steps i followed were:
1. Made a directory in C: and named it cgi-bin
2. Wrote my source code file and saved it with
On 22 February 2011 17:19, Shawn H Corey shawnhco...@gmail.com wrote:
when I put this line in a script say a.pl:
#!/usr/bin/perl -wl
so, does this make perl ignore the wl switch in the script?
No, perl reads the shebang line and sets the options.
perl doesn't do any such thing. In a *nix
spoke too soon. seems that under both linux and windows perl does read
the shebang line. please ignore previous comment
On 7 March 2011 10:24, Erez Schatz moonb...@gmail.com wrote:
On 22 February 2011 17:19, Shawn H Corey shawnhco...@gmail.com wrote:
when I put this line in a script say a.pl
On 20 January 2011 15:38, Eyal B. ewinst...@gmail.com wrote:
I'm writing a scripts that check the TTL of the ping and found the OS.
According the TTL - the script should let me know which OS it is :
Linux/ Windows or Unix (Hash table)
I'm getting an error on the line where I should use the
On Thu, 30 Dec 2010 12:35:37 +0200, Shlomi Fish shlo...@iglu.org.il
wrote:
On the other hand, most of my
posts (and those of most other active members of the lists) were
replies
for people asking for help, while trying to be helpful. And since I
subscribed I've posted much more posts than
This is so blatantly OT it shouldn't be on this list.
--
Erez
Observations, not opinions.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 12/28/2010 01:04 PM, Shlomi Fish wrote:
Hello Erez (and all),
On Tuesday 28 Dec 2010 11:01:40 Erez Schatz wrote:
This is so blatantly OT it shouldn't be on this list.
Maybe my impression is a bit biased, but it seems to me that most of your
posts to this list are replies to my posts
On 26/dic/2010, at 19:54, SERIER stephenm.william...@gmail.com wrote:
What are some of the best books for newbies to perl?
For a programming beginner in general, Learning Perl
(http://oreilly.com/catalog/9780596520106/ by Randal Schwartz, Tom
Phoenix, and Brian D. Foy, aka the Llama book) is
On 12/27/2010 06:11 AM, Sisyphus wrote:
- Original Message - From: Randal L. Schwartz
mer...@stonehenge.com
To: beginners@perl.org
Sent: Monday, December 27, 2010 1:57 PM
Subject: Re: Syntax Errors
Bill == Bill Casey wtca...@wtcasey.com writes:
Bill Syntax error at
On 12/15/2010 04:09 PM, Jeff Peng wrote:
Hi,
I have intalled activeperl 5.10 on windows and try to install a perl
package.
Hello Jeff,
If possible, I recommend installing from the Strawberry Perl
distribution: http://strawberryperl.com
It includes a functioning cpan client, and comes with a
On 11/29/2010 03:27 AM, Kenneth Wolcott wrote:
The reason one should use File::Basename and File::Spec is that you
can become platform-independent instead of Windoze-worshipping :-)
Ken Wolcott
I worship whatever I'm paid to work on. For a Windows shop, the overhead
of platform
There are many books available,
On Fri, 26 Nov 2010, Shlomi Fish wrote:
Hi Uma,
welcome to the Perl world.
On Thursday 25 November 2010 17:12:49 Umashankar wrote:
Hi All,
I started my career in a software firm, am working in PERL platform.
Can some one guide me by providing some online
On Fri, 26 Nov 2010, Shlomi Fish wrote:
Actually I use Alpine, but thanks for that warning, I'll make sure to
delete all links from my future posts, because research shown that humans
are intelligent enough to follow a thread without being spoonfed through
the throat.
Hi Erez,
next time,
On 10/08/2010 12:07 AM, Shlomi Fish wrote:
Hi all,
after being tired of telling Perl newcomers about the same problems with
their
code times and times again, I've decided to create this page detailing Perl
Elements to avoid:
Nobody is forcing you to tell anyone anything. Teaching and
On 09/25/2010 01:57 AM, Vaishnavi Saba wrote:
@common = inter( \%foo, \%bar, \%joe );
sub inter {
my %seen;
for my $href (@_) {
while (my $k = each %$href ) {
$seen{$k}++;
}
}
return grep { $seen{$_} == @_ } keys %seen;
}
Usually not a good
First, I urge you to try parsing this doc with a dedicated RSS parser,
it will do miracles for your needs. Second, the dumper you print here
is not the full document, but one branch, it might be that what you
loop over is not an arrayref, or might not work the way you think. Try
running a Dumper
On 28 July 2010 01:31, Jane D. janedun...@gmail.com wrote:
I'm basically retrieving an XML file from Digg. I can retrieve the
Digg data okay, but am struggling with trying to process the returned
data with Perl, largely on account with my unfamiliarity with XML
processing, but also because
On 13 July 2010 13:00, Bryan R Harris bryan_r_har...@raytheon.com wrote:
I thought this would work:
s/(['])([^\1]*)\1/${1}.despace($2).$1/gse;
... but it doesn't. It looks like the [^\1]* in the regexp isn't working
right.
Character classes (characters inside square brackets - []) in
On 13 July 2010 18:16, Shawn H Corey shawnhco...@gmail.com wrote:
Because [] define a character set; everything inside it is a character.
That means it does not expand \1.
That's not entirely correct. Character classes recognize variables,
escaped characters and some other regexp notation,
For a windows machine, I'd actually recommend a non-perl solution,
called autoit, available here
http://www.autoitscript.com/autoit3/index.shtml. It's a
Windows-oriented scripting language which is very useful for
automating actions in the GUI and the GUI system (in Windows, the GUI
is an integral
You need to specify that the string you look for should not appear in
the part you try to extract, meaning instead of .*? you should be
looking for (not abc)*? In perl, we have the negative lookahed for
that: (?!...): m/abc((.(?!abc))*?)xyz/
However, this would fail if you have a string abc
All this and more is available at http://perldoc.perl.org/perlre.html
On 27 April 2010 12:39, Erez Schatz moonb...@gmail.com wrote:
You need to specify that the string you look for should not appear in
the part you try to extract, meaning instead of .*? you should be
looking for (not abc
On 24 February 2010 15:03, HACKER Nora nora.hac...@stgkk.at wrote:
Normally ARGV - shortened to is preferable over STDIN;
I initially used this syntax but received an error because I start my
script with 1-2 parameters (one required, second one optional):
On 2 February 2010 13:46, Shlomi Fish shlo...@iglu.org.il wrote:
Regarding PERL - it's either perl or Perl but never PERL:
http://perl.org.il/misc.html#pl_vs_pl
What does have got to do with the question?
Please go to http://perl-begin.org/ and find a good resource to learn Perl. To
qoute
On 2 February 2010 09:19, venu madhav venutaurus...@gmail.com wrote:
I've a situation where I create a hash variable in PERL and
use it in Java script which is embedded in the CGI. The key for that
hash is taken from JavaScript. For ex:
- CGI code
my %hash{3}=300;
On 2 February 2010 15:06, Shlomi Fish shlo...@iglu.org.il wrote:
Ahmm... no.
Are you physically unable to say anything in a social manner?
my %hash = (3 = EOF);
/script
script type=text/javascript
!--- Insert nasty JS here ---
/script
img src=spammer stuff
This is called a
2010/1/19 harish behl harish_behl1...@yahoo.com:
My Script has to search a particular string like \$Header\$ in files and if
this string is found, it should replace it with \$Header
$NameofFile 01/01/2009. But it's making the files blanks.
This means you have a problem in the part that is
2010/1/16 Grant emailgr...@gmail.com:
LabelResponse
Label
Image Number=1base64datahere/Image
Image Number=2base64datahere/Image
Image Number=3base64datahere/Image
/Label
/LabelResponse
#!/usr/bin/perl
use strict;
use warnings;
use XML::Simple;
my $data = XMLin($path_to_file);
LabelResponse
Label
Image Number=1base64datahere/Image
Image Number=2base64datahere/Image
Image Number=3base64datahere/Image
/Label
/LabelResponse
I need to be able to grab the correct set of base64 data. Does anyone
know how to do that?
It's a common practice, to avoid using
2010/1/9 C.DeRykus dery...@gmail.com:
On Jan 5, 12:13 am, moonb...@gmail.com (Erez Schatz) wrote:
2010/1/5 Jeff Peng jeffp...@netzero.net:
...
This is something that Perl (post version 5.6) does inherently, which
is compiling a regex only once as long as the pattern isn't modified.
Prior
2010/1/5 Jeff Peng jeffp...@netzero.net:
Hello,
Can the code (specially the regex) below be optimized to run faster?
#!/usr/bin/perl
for ($i=0; $i1000; $i+=1) {
open HD,index.html or die $!;
while(HD) {
print $1,\n if /href=http:\/\/(.*?)\/.* target=_blank/;
}
close HD;
}
On 28/12/2009, Shlomi Fish shlo...@iglu.org.il wrote:
Hi Christoph!
On Monday 28 Dec 2009 13:11:17 Christoph Friedrich wrote:
My Big Problem is that I must copy an object to do a backtracking method
(I am going to develop a sudoku solver).
Moreover, I should note that there are plenty of
Shlomi, please stop correcting the English of those who post here.
It's rude, off-topic, and unimportant. This isn't a language mailing
list and you are not its chief linguistic officer. I understand you
take pride in your English, since you are not a native speaker, but
that has nothing to do
2009/12/23 Raheel Hassan raheel.has...@gmail.com:
Hi,
I need to install SNMP_Session.pm in Fedora core 12, can any one guide me
how i can install this package and from where i get this. It is working in
my ubuntu machine but in fedora i am unable to find.
(Warning: I have zero experience in
2009/12/23 Raheel Hassan raheel.has...@gmail.com:
Thanks for your reply Schatz. Yes i installed many modules using the same
method but the problem that i am facing this time is due to this package
SNMP_session.pm. In CPAN also i am unable to find this package. Where as in
Ubuntu it is present
A pox on gmail's reply not sending to list.
2009/12/22 Erez Schatz moonb...@gmail.com:
2009/12/21 Vishnu chadavis...@gmail.com:
I was going through the book intermediate perl and came across the
following code.
I'm not familiar with the scope of Intermediate Perl, but from your
questions
2009/12/21 Xiao Lan (小兰) practicalp...@gmail.com:
my $dbh = DBI-connect(...);
my $pid = fork;
if ($pid ) { # parent
do something;
} else { # child
do something another;
$dbh-disconnect;
}
What I want to know is, when $dbh get disconnected in child, will it
influence the one in
2009/12/20 sftriman dal...@gmail.com:
I use this series of regexp all over the place to clean up lines of
text:
$x=~s/^\s+//g;
$x=~s/\s+$//g;
$x=~s/\s+/ /g;
You can probably use $x=~s/^(\s+)|(\s+)$//g;
But I don't think it will use any less CPU than the 3 regex option,
the nature of
2009/12/20 sftriman dal...@gmail.com:
I've been wondering for a long time... is there a slick (and hopefully
fast!) way
to do this?
foreach (keys %fixhash) {
$x=~s/\b$_\b/$fixhash{$_}/gi;
}
You can do a global substitute of the sentence and see if they match
any key in the hash. i.e.:
One problem I have with Merlyn, is when he starts talking about
something, you're willing to throw everything away and go where he
points. He's such a passionate, compelling speaker.
My other problem is that he's mostly right.
2009/12/19 Philip Potter philip.g.pot...@gmail.com:
2009/12/19 Parag
2009/12/12 Philip Potter philip.g.pot...@gmail.com:
2009/12/12 Shawn H Corey shawnhco...@gmail.com:
Alan Haggai Alavi wrote:
Hi,
Windows requires you to use double quotes in place of single quotes. Saving
to
a file and executing it is the only way that is cross-platform, I suppose.
2009/12/8 Majian jian...@gmail.com:
my $s = The black cat jumped from the green tree;
print index $s, e, 3 The result is 18
It's slightly confusing, but if you get the idea behind it, it's
actually very simple:
counting from 0, the string The black cat jumped from the green tree
has an
2009/12/8 Anders Hartman an...@melerit.se:
Hello,
I which to use eval to execute subroutines dynamically.
The following code snippet fails:
#!/usr/bin/perl
use strict;
use warnings;
sub asub {
our $abc;
print $abc;
}
my $abc = abc\n;
eval asub;
exit 0;
However, I DO need to
2009/12/6 Shlomi Fish shlo...@iglu.org.il:
Hi Agnello!
That put aside, you really should work on writing your English text better.
While one can understand it, the style (punctuation, capitalisation, spelling,
etc.) is horrible.
Not as horrible as the tone of this comment. In Perl we accept
2009/12/6 Jeff Pang pa...@arcor.de:
Parag Kalra:
So what are the main Perl modules which I need to install and any good
tutorial link would be really appreciated.
For the modules, CGI and DBI is mostly what you wanted, these two modules
are built-in ones in recent perl release.
I
2009/11/30 David Schmidt zivildie...@gmail.com:
Hello
I would like to execute some Code after a certain amount of time has
passed (then restart the timer but with a different time value)
Basically I am looking for something as simple as
my $do_it = { ... };
use MyTimer;
my timer =
2009/11/29 raphael() raphael.j...@gmail.com:
Hi,
I want the below if loop to end if it cannot find any match print the die
message.
However it just exit without hitting my die
Any Ideas?
Lots. First, give us some more information regarding which data you're
comparing to what. In the code
2009/11/13 Anant Gupta anantgupta...@gmail.com:
ohhh ok.
Thanks for the help
But there is an XML example using XML::Twig in which
the author has defined the hash as
my $hash={ 'abc'='def'.
'ghi'='jkl',
'mnp'='pqr'
}
I thought it
2009/11/12 Anant Gupta anantgupta...@gmail.com:
my %hash;
my $abc;
my $count;
while(defined($ARGV[$count]))
{
push(@hash{$abc},$ARGV[$count]);
}
The error is Type of arg 1 must be array not hash element ...
The error is correct, you can't push to a hash element. Question is,
what
2009/11/3 Majian jian...@gmail.com:
my $i = 1;
print ++$i + ++$i, \n;
The above code prints out the answer 6 .
But in the other language the anser is 5 ,
From the documentation
(http://perldoc.perl.org/perlop.html#Auto-increment-and-Auto-decrement):
Note that just as in C, Perl
2009/11/2 Anant Gupta anantgupta...@gmail.com:
Hello,
In the foreach loop, without going to the beginning of the loop, i want to
get the next iteration of data. How do i get it.
eg
You can always use a for loop and refer to the next item:
for (my $i= 0; $i @lines; $i++) {
if ($lines[$i + 1]
2009/10/25 M. E8. H. cispro...@yahoo.com:
This is an minor topic. I feel the Camel logo to represent Perl to be
strange, illogical and slightly ugly. I presume I do not get the humor.
However I prefer a swiss army knife -liked tool or a red tool box with tons
of tools to be a better
2009/10/24 net...@royal.net:
I'm always wanting to know this. Thanks.
O'Reilly media, publishers of Programming Perl (as well as Learning,
Advance, Mastering, Best Practices, Cookbook and many other Perl
books), have a practice of placing animal drawings on the cover of the
books and the
2009/10/12 rea...@newsguy.com:
rea...@newsguy.com writes:
What is the proper way to escape or protect an `at sign' (@) inside a
perl script where you might need it for sending email.
At the most basic level, using single quotes ('like this') rather than
double quotes (like this) will not
2009/9/10 Philip Potter philip.g.pot...@gmail.com:
2009/9/10 Tariq Doukkali tariq.doukk...@autoform.de:
Hi,
i can not understand, what does this code:
$| = 1;
This means the programmer wishes that the buffer will be flushed after
every write, or print.
Normally (i.e. $| = 0), the computer
Accidentally sent to Gabor, rather to the list:
2009/9/7 Gabor Szabo szab...@gmail.com:
Hi,
Many projects assume a lot of background already that beginners
might not yet have. What things would beginners need in order to
get involved in a project?
I think it all boils down to clear, simple
2009/9/4 Noah Garrett Wallach noah-l...@enabled.com:
is there any way to search for the following text? In some cases the text
that I am search could be
one-two-three-
or sometimes the text could be one-two-
If you're looking for this specific text then a good answer was
already given, but
2009/8/21 pdfe...@aep.com:
In *NIX shell scripting, the variable $0 refers to the
zeroth command line parameter,
i.e., the program itself. I would like to use something like this in my
perl scripts. Is there an
equivalent to this in perl?
(un)surprisingly enough, it's $0.
--
Erez
The
You can also read on all the special variables in Perl by typing
'perldoc perlvar' on your shell, or at
http://perldoc.perl.org/perlvar.html
2009/8/21 Erez Schatz moonb...@gmail.com:
2009/8/21 pdfe...@aep.com:
In *NIX shell scripting, the variable $0 refers to the
zeroth command line
2009/5/25 sanket vaidya sanket.vai...@patni.com:
What is the difference between the 'for' 'foreach' loops?
There is none.
http://perldoc.perl.org/perlsyn.html#Foreach-Loops :
The foreach keyword is actually a synonym for the for keyword, so you
can use foreach for readability or for for
I recommend Strawberry Perl (http://strawberryperl.com), it's closer
to the Perl idea of distribution, especially seeing as ActiveState
isn't as good as it used to be. Also, it uses CPAN out of the box, so
IMO, is much better.
On Fri, May 15, 2009 at 8:04 PM, JeffHua jeff...@aol.com wrote:
On 4/6/2009 16:18, Telemachus wrote:
On Mon Apr 06 2009 @ 2:44, Irfan Sayed wrote:
please adivce / help
Regards
Irfan
Please don't reply to your own mail as a way of nudging people to reply.
It's more likely to annoy than to get you an answer.
also:
2009/3/12 Deviloper devilo...@slived.net
Can somebody explain what Backtracking is?
thanx,
B.
In a nutshell, consider the following regex: /foo((b+)ar)/
a regex engine will check every character in the string that is
checked against until it reaches the first f. When reached, it will
mark
2009/3/11 kevin liu lwtben...@gmail.com:
�...@array = qx{ps -ef | grep hald-runner};
chomp @array;
foreach ( @array ) {
if (/grep hald-runner/) {
next;
}
}
Here my confusion comes: What the grep here will mean??
Here grep is just a plain text or
(This is basically a name your favourite editor question.
Here's two ideas I found in my own search:
1. Komodo Edit and Komodo IDE (http://activestate.com/komodo_edit/).
The Free and non-free versions of an IDE/Editor that is created by
ActiveState, who specialise in support for dynamic
2009/2/8 Blazer evanstroh...@yahoo.co.uk:
I have limited experience of programming in C C++ -
Good. Perl has a C-like syntax, and supports a lot of C's idioms. It
is, in my experience easier to learn as a second language, after you
learned (at least some) other language.
I just kept reading
On 1/30/2009 12:59 AM, thebarn...@gmail.com wrote:
Hi
I run this command and pipe the output to a perl one liner. not quite
sure how it parses the data:
svmon -Pt3 | perl -e 'while(){print if($.==2 || $!$x++); $.=0 if
(/^--+$/)}'
i understand that it resets the line count every time it
On 1/30/2009 5:34 PM, Octavian Rasnita wrote:
Hello,
Does anyone have some recommendations for some tutorials/documentation
for using perlscript as a client-side language in browsers?
I really recommend against it, whatever was of PerlScript is immensely
dated, and, IIRC, Internet Explorer
On 1/31/2009 8:45 AM, Roman Makurin wrote:
Hi All!
Which is best way to parse(not create) RSS Feeds(0.9, 1.0 and 2.0) in
perl ? I looked through XML::RSS, but it looks like mostly for creating
feeds.
It's also for parsing them. Try
#!/usr/bin/perl
use strict;
use warnings;
use XML::RSS;
use
2009/1/27 S, Rajini (STSD) rajin...@hp.com:
In perl is there any system defined functions to find out the
Differences in dates.
Not as such. There are ways to do it by using Date:: modules, like
Date::Manip, Date::Calc, or DateTime.
Try the following links for more detailed information about
72 matches
Mail list logo