On Sun, 16 Jan 2005 18:36:09 +0500
Sara [EMAIL PROTECTED] wrote:
I am trying to extract links along with HTML tags a href=blah from a
list, but it's not working on my XP machine with Active State Perl
5.0.6 Kindly help.
# CODE START
my @array = qq|
I just tried that on the command-line, and I'm not getting the warning
you're seeing. What version of Perl are you running?
And have you tried alternatives like
my @files = `ls`;
or using opendir/readdir?
Paul
Yesterday, David Gilden wrote:
Last question here,
#!/usr/bin/perl -wT
Snip
On Mon, 17 Jan 2005, Alexander Blüm wrote:
this is also possible _without_ any modules, except maybe strict.
# this will replace the contents of each match in @get
foreach(@array){
my @get = $_ =~ /a href=(.*?)/g;
}
What happens if the url has a doublequote followed by an angle bracket?
NAME
beginners-faq - FAQ for the beginners-cgi mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to [EMAIL PROTECTED]
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email
Hi,
The code below works fine if run like:
using PERL version 5.00503
#!/usr/bin/perl -w
but with
#!/usr/bin/perl -wT
I am still getting error: Insecure dependency in glob while running with -T
switch
Can I turn off 'tainting' for this block
{
# turn off taint for this block only
Hi I tried this Chart::ThreeD::Pie module. Installation doesn't show any error..
I am getting this error...
In the line 21, I have use GD;
How will I install this module.. please help me
Can't locate GD.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0
Hi I need help regarding substituion of varaibles with values
Say I have a txt file (a.txt)
which has only one line:
Hi $name
The PL file
open INPUT, a.txt;
my $name=Anish;
my $temp=;
while (INPUT)
{
$temp=$temp.$_;
}
close(INPUT);
print Content is: $temp;
In the output I want the
On Mon, 17 Jan 2005 16:11:54 +0530, Anish Kumar K.
[EMAIL PROTECTED] wrote:
Hi I need help regarding substituion of varaibles with values
Say I have a txt file (a.txt)
which has only one line:
Hi $name
Don't think of $name as a perl variable, but as a placeholder. It
looks better if you
Hi.
I'm trying to make perl bindings for the GnuTLS library, but I'm having
som problems with h2xs when generating XS-stubs:
$ h2xs -x /usr/include/gnutls/gnutls.
Defaulting to backwards compatibility with perl 5.8.4
If you intend this module to be compatible with earlier perl version
specify a
On Mon, 17 Jan 2005, Robin wrote:
On Monday 17 January 2005 19:53, Harold Castro wrote:
versa. What I'm thinking now is to create a simple
perl script that will create a file, as huge as it can
be, or just a continues stream of dummy bytes being
uploaded to a remote host. Only I don't
quote who=zentara
On Sun, 16 Jan 2005 22:53:29 -0800 (PST), [EMAIL PROTECTED] (Harold
Castro) wrote:
Hi,
Our company is involved in internet service
providing, and as such, troubleshooting our partner's
links is one of our day to day activities. We have our
own network monitoring system
I'm trying to create a little form usign CGI.pm but I get this error from
apache:
malformed header from script. Bad header=form method=post action=/c:
/usr/lib/cgi-bin/make_graph_CPU_form.pl.cgi
this is my perl code:
#!/usr/bin/perl
use CGI qw/:standard/;
sub print_form {
print
On Mon, 17 Jan 2005 14:41:40 +0100, Mauro [EMAIL PROTECTED] wrote:
I'm trying to create a little form usign CGI.pm but I get this error from
apache:
malformed header from script. Bad header=form method=post action=/c:
/usr/lib/cgi-bin/make_graph_CPU_form.pl.cgi
this is my perl code:
I'm trying to create a little form usign CGI.pm but I get this error from
apache:
malformed header from script. Bad header=form method=post action=/c:
/usr/lib/cgi-bin/make_graph_CPU_form.pl.cgi
this is my perl code:
#!/usr/bin/perl
use CGI qw/:standard/;
sub print_form {
print
I have some data that needs to be split up alphabetically into lists
that start with each letter of the alphabet. Sample data is like the
following with real URL data in place of URL1 and URL2. Only the first
field is important for alphabetizing. If I do an array with each letter
(and it
I have some data that needs to be split up alphabetically into lists
that start with each letter of the alphabet. Sample data is like the
following with real URL data in place of URL1 and URL2. Only
the first
field is important for alphabetizing. If I do an array with
each letter
NAME
beginners-faq - FAQ for the beginners mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to [EMAIL PROTECTED]
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address):
Hi,
I have the following code in a script I'm writing:
foreach my $line (INN) {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there is :)
The script will be reused and
Hi,
I have the following code in a script I'm writing:
foreach my $line (INN) {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there is :)
The script will be
On Mon, 17 Jan 2005 08:37:07 +0100, manfred [EMAIL PROTECTED] wrote:
That leads me to a question :-)
if ($num =~ /^(\d+)\#([^\#]*?)\#(?:e\+(\d+))?$/x) {
What particular use has the _x_ modifier in this example?
I mean the hashes are escaped?
I forgot to remove the /x when I stripped
Hi All,
time for me to ask dumb questions again...
I have a script, what i want it to do is scan through a Cisco
router Config file (nicely saved in a text file already so no need for
and SNMP), then output it to a .csv file.
I an using the Cisco::Reconfig; module to help me out.
My
On Mon, 17 Jan 2005 16:11:54 +0530, Anish Kumar K.
[EMAIL PROTECTED] wrote:
Hi I need help regarding substituion of varaibles with values
Say I have a txt file (a.txt)
which has only one line:
Hi $name
The PL file
use strict;
use warnings;
open INPUT, a.txt;
Always
Hi all,
First post to the group. I have two questions, but they go hand in hand. The
first:
Net::FTP documentation reports that get syntax is:
get ( REMOTE_FILE [, LOCAL_FILE [, WHERE]] )
I do the following (with $ftp initialization omitted here):
local $fh = IO::File-new_tmpfile;
On Mon, 17 Jan 2005 17:57:28 +, RichT [EMAIL PROTECTED] wrote:
Hi All,
time for me to ask dumb questions again...
I have a script, what i want it to do is scan through a Cisco
router Config file (nicely saved in a text file already so no need for
and SNMP), then output it to
Hi all,
I have tried using the module CGI::Session with MySQL.
If I try
$session-id;
It prints fine the hash of the current session, but if I try to
print $session-name;
or
$session-header;
It gave me the following error:
Can't locate auto/CGI/Session/MySQL/name.al in @INC (@INC contains:
On Mon, 17 Jan 2005 14:08:10 -0500, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Worked perfectly. I knew it was something simple. Thanks!
Never used POSIX before. Looked at it on cpan but those descriptions can be
flat sometimes. If you don't mind, what are some practical uses for it? Just
Hi again,
Sorry for my previous post. I found the problem.
I wrote by mistake:
use CGI::session;
(with a small s and this sometimes work under Windows, but sometimes for
some tasks it doesn't.
And that's why perl didn't tell me that it couldn't find that module.
Teddy
- Original
Anish Kumar K. wrote:
Hi I need help regarding substituion of varaibles with values
That is a Frequently Asked Question.
perldoc -q How can I expand variables in text strings
Say I have a txt file (a.txt)
which has only one line:
Hi $name
The PL file
open INPUT, a.txt;
You should
Tim McGeary wrote:
I have some data that needs to be split up alphabetically into lists
that start with each letter of the alphabet. Sample data is like the
following with real URL data in place of URL1 and URL2. Only the first
field is important for alphabetizing. If I do an array with each
Tor Hildrum wrote:
Hi,
Hello,
I have the following code in a script I'm writing:
foreach my $line (INN) {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there is :)
The script
Hi all,
I am new to perl, I receive some spam email with subject like st0ck,
0pportunities, gr0wth..., how can I match those words with number 0 in
Thanks in advance
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi All
I have this bit of code in a program I'm working on.
while (RAWREPORT) {
next if /\f/ ;
next if /^DATE : / ;
next if /^\s{15,}PART / ;
next if /^COUNTER QTY/ ;
next if /^\s+$/ ;
print ; #
I am new to perl, I receive some spam email with subject like st0ck,
0pportunities, gr0wth..., how can I match those words with number 0 in
Something like
__CODE__
use warnings;
use strict;
use Data::Dumper;
# add to this hash to make it slower
my %rep = (
'a' = [4],
'e' = [3],
'i' =
[EMAIL PROTECTED] wrote:
Hi all. How can I check, within a script, to see if it is being run as root
or not? I would like it to exit with an error message if it is not running
as root. I'm looking for something that works across *nix platforms so that
my script is portable. Is there a perl
Hello,
I believe this will do what you want:
next if grep { $rawreport_item =~ /$_/ } @possibleMatches;
Just make sure the regexes in @possibleMatches are not user supplied or
they may try sneaky bad things :)
perl -mstrict -we 'my @m = (q(^\d+$), q(^\w+$)); for my $item (qw(123
abc 1-2we)){
B McKee wrote:
Hi All
Hello,
I have this bit of code in a program I'm working on.
while (RAWREPORT) {
next if /\f/ ;
next if /^DATE : / ;
next if /^\s{15,}PART / ;
next if /^COUNTER QTY/ ;
next if /^\s+$/ ;
Greetings,
The second piece of code should look for * InTune somewhere in the
first line
of the file if it does not, it should unlink the bad file and fire off the
error, it seems
to happen all the time regardless of the match.
Two quick questions here:
I can't see why I am getting this
On Mon, 17 Jan 2005 16:04:48 -0500, Dave Gray [EMAIL PROTECTED] wrote:
I am new to perl, I receive some spam email with subject like st0ck,
0pportunities, gr0wth..., how can I match those words with number 0 in
What about something like this:
if ( $subject =~
is there a way to add a -e to check to see if we have a file to unlink ?
How about:
open (FH, UPLOAD_DIR . /$file) || die ( $q, Error reading $file
for test : $! );
That will stop processing at that point, if you aren't able to open
the file for any reason (like it doesn't exist).
On Mon, 17 Jan 2005, Vincent wrote:
I am new to perl, I receive some spam email with subject like st0ck,
0pportunities, gr0wth..., how can I match those words with number 0
in
You don't.
I spent a about a year doing pretty much what you're asking for here,
though with Procmail rules
Hi All,
I created a script that renames a dir of MP3 files... Everything is
working well except when I try to write the new files to a directory.
I thought I could print to a dirhandle, apparently not.. :~) Maybe I
need to mv the $newfile...? not sure... Any help would be greatly
From: Tor Hildrum [EMAIL PROTECTED]
I have the following code in a script I'm writing:
foreach my $line (INN) {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there
G'day...
if ($_ !~ /\*{5} InTune/){
This should be:
if ($_ !=~ /\*{5} InTune/) {
Should it?
I always thought that !~ was the inverse of =~
I.e.
$var !~ /pattern/
was the equivalent of
!($var =~ /pattern/)
(at least within test conditions anyway)
Is there something
Brian Volk wrote:
Hi All,
Hello,
I created a script that renames a dir of MP3 files... Everything is
Perhaps File::Copy::Recursive can assist you in this?
http://search.cpan.org/~dmuey/File-Copy-Recursive-0.02/Recursive.pm
use File::Copy::Recursive 'dircopy';
dircopy($orig,$new) or die Copying
JupiterHost.Net wrote:
Brian Volk wrote:
Hi All,
Hello,
I created a script that renames a dir of MP3 files... Everything is
Perhaps File::Copy::Recursive can assist you in this?
http://search.cpan.org/~dmuey/File-Copy-Recursive-0.02/Recursive.pm
use File::Copy::Recursive 'dircopy';
if ($_ !~ /\*{5} InTune/){
This should be:
if ($_ !=~ /\*{5} InTune/) {
Please ignore this. Your use of the operator is correct.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Brian Volk wrote:
JupiterHost.Net wrote:
Brian Volk wrote:
Hi All,
Hello,
I created a script that renames a dir of MP3 files... Everything is
Perhaps File::Copy::Recursive can assist you in this?
http://search.cpan.org/~dmuey/File-Copy-Recursive-0.02/Recursive.pm
use File::Copy::Recursive
Hi All,
Could you help me to solve following problem:
I need to execute tkl script with two arguments (input file and output file)
within my Perl script:
#!/usr/bin/perl -w
use strict;
use File::Basename;
my @gdflist = `find . -name *.gdf`;
my $gdf_number = scalar(@gdflist);
my $counter = 0;
Vladimir Lemberg wrote:
Hi All,
Could you help me to solve following problem:
I need to execute tkl script with two arguments (input file and output file)
within my Perl script:
#!/usr/bin/perl -w
use strict;
use File::Basename;
my @gdflist = `find . -name *.gdf`;
my $gdf_number =
Thanks it is working fine
Anish
- Original Message -
From: Dave Gray [EMAIL PROTECTED]
To: beginners perl beginners@perl.org
Sent: Monday, January 17, 2005 11:43 PM
Subject: Re: Substitute Varaible
On Mon, 17 Jan 2005 16:11:54 +0530, Anish Kumar K.
[EMAIL PROTECTED] wrote:
Hi
On Tue, 18 Jan 2005 01:08:56 +0100, Jenda Krynicky [EMAIL PROTECTED] wrote:
foreach my $line (INN) {
if ( $line =~ /^[^,]*(?:,[^,]*){10}$/) ) {
print OUT $line;
}
}
That is check whether the full string is something not containing
comma followed by ten times comma and
Hello,
I installed CYGWIN on Win-2000 hoping to have a Linux like environment and run
PERL.
I was expecting to click on the CYGWIN desktop icon and get a prompt window and
move on.
but that is not what I got. when I double click on CYGWIN desktop icon
something flashes
and disappears quickly
52 matches
Mail list logo