__DATA__ Token Question

2004-07-21 Thread Bastian Angerstein
Hello, some weeks ago I had a question regarding The DATA-Token. Now there is anonther one: Could I change the contens of the datatoken (filehandle) during the runtime of the skript? If anyone has an idea I would be grateful. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

RE: CGI script just stops...

2004-07-21 Thread Marcos . Rebelo
Some time ago I had a similar error because I has not in the suposed directory. 1º try whith the full path. 2º see which is the directory where you really are. For getting the script directory you can use the use File::Spec; use FindBin; open(LISTFILE, ">>".File::Spec->join($FindBin::Bin, $list

CGI script just stops...

2004-07-21 Thread Bryan Harris
This one baffles me: > print "$listfn, I guess we got here.\n"; > > # write additions to their file > open(LISTFILE, ">>$listfn") || print "$listfn could not be > written: $!\n"; > print LISTFILE join("\n", @newlist, ""); > close(LISTFILE); > > print "Here too?\n"; This is part of a CGI scri

Re: parsing HTML

2004-07-21 Thread Andrew Gaffney
Andrew Gaffney wrote: Randy W. Sims wrote: On 7/21/2004 11:24 PM, Andrew Gaffney wrote: Randy W. Sims wrote: On 7/21/2004 10:42 PM, Andrew Gaffney wrote: I am trying to build a HTML editor for use with my HTML::Mason site. I intend for it to support nested tables, SPANs, and anchors. I am looking

Re: parsing HTML

2004-07-21 Thread Andrew Gaffney
Randy W. Sims wrote: On 7/21/2004 11:24 PM, Andrew Gaffney wrote: Randy W. Sims wrote: On 7/21/2004 10:42 PM, Andrew Gaffney wrote: I am trying to build a HTML editor for use with my HTML::Mason site. I intend for it to support nested tables, SPANs, and anchors. I am looking for a module that can

Re: parsing HTML

2004-07-21 Thread Randy W. Sims
On 7/21/2004 11:24 PM, Andrew Gaffney wrote: Randy W. Sims wrote: On 7/21/2004 10:42 PM, Andrew Gaffney wrote: I am trying to build a HTML editor for use with my HTML::Mason site. I intend for it to support nested tables, SPANs, and anchors. I am looking for a module that can help me parse existi

Re: parsing HTML

2004-07-21 Thread Andrew Gaffney
Randy W. Sims wrote: On 7/21/2004 10:42 PM, Andrew Gaffney wrote: I am trying to build a HTML editor for use with my HTML::Mason site. I intend for it to support nested tables, SPANs, and anchors. I am looking for a module that can help me parse existing HTML (custom or generated by my scripts)

Re: parsing HTML

2004-07-21 Thread Randy W. Sims
On 7/21/2004 10:42 PM, Andrew Gaffney wrote: I am trying to build a HTML editor for use with my HTML::Mason site. I intend for it to support nested tables, SPANs, and anchors. I am looking for a module that can help me parse existing HTML (custom or generated by my scripts) into a tree structure

parsing HTML

2004-07-21 Thread Andrew Gaffney
I am trying to build a HTML editor for use with my HTML::Mason site. I intend for it to support nested tables, SPANs, and anchors. I am looking for a module that can help me parse existing HTML (custom or generated by my scripts) into a tree structure similar to: my $html = [ { tag => 'table',

Re: question about strict

2004-07-21 Thread Randy W. Sims
On 7/21/2004 8:20 PM, FyD wrote: Dear All, I have two perl scripts: - The first one: sub Tt { $TTT = uc($TTT); if(($TTT ne "ON") && ($TTT ne "OFF")){ print "ERROR: Check variable TTT";} else { print "It is a Test...";} } # ---MAIN--- $TTT = "OFF"; Tt(); If I use $TTT = "

Re: question about strict

2004-07-21 Thread Flemming Greve Skovengaard
FyD wrote: Dear All, I have two perl scripts: - The first one: sub Tt { $TTT = uc($TTT); if(($TTT ne "ON") && ($TTT ne "OFF")){ print "ERROR: Check variable TTT";} else { print "It is a Test...";} } # ---MAIN--- $TTT = "OFF"; Tt(); If I use $TTT = "OFF", I get 'It is a T

Re: Efficient Formatting

2004-07-21 Thread John W . Krahn
On Wednesday 21 July 2004 10:52, Kent, Mr. John \(Contractor\) wrote: > > Greetings, Hello, > Want to print out a formattted line of numbers > > Is there a way to avoid having to: > >printf "%8d %8d %8d . ten times",$num1,$num2,$num3, ... , > > $num10; ? > > Something like > printf "%8d" * 10

question about strict

2004-07-21 Thread FyD
Dear All, I have two perl scripts: - The first one: sub Tt { $TTT = uc($TTT); if(($TTT ne "ON") && ($TTT ne "OFF")){ print "ERROR: Check variable TTT";} else { print "It is a Test...";} } # ---MAIN--- $TTT = "OFF"; Tt(); If I use $TTT = "OFF", I get 'It is a Test...' an

Re: regular exp

2004-07-21 Thread Jenda Krynicky
From: jack jack <[EMAIL PROTECTED]> > I have 2 variables $last_accessed and $owner_line > > $last_accessed=": Last accessed 20-Apr-04.12:57:30 by > [EMAIL PROTECTED]"; > > $owner_line="Owner: opc_bld : rwx (all)"; > > -From $last_accessed i want the foll output in > variables : > > $vi

cron, file open

2004-07-21 Thread Nurcan Yuruk
I use perl Schedule::Cron module to schedule some subroutines. These subroutines contain file operations and the problem is particularly with the file open functions: sysopen, open. In case of setting detach parameter ( $cron->run(detach=>1) ), so I detach the main scheduler loop from the curr

Re: Serving up a pdf file

2004-07-21 Thread Philipp Traeder
On Wednesday 21 July 2004 HH:44:20, David Arnold wrote: > Phillip, Hi David, please bottom post. > > Thanks, but this is not quite what I was looking for. > > When the user clicks on "Quiz1" a perl script will be called to generate > and compile a tex file using pdflatex. Once that is complete, I

Re: Serving up a pdf file

2004-07-21 Thread David Arnold
Phillip, Thanks, but this is not quite what I was looking for. When the user clicks on "Quiz1" a perl script will be called to generate and compile a tex file using pdflatex. Once that is complete, I will have a file Quiz1.pdf which I want to send back to the user. Thanks. At 10:09 PM 7/21/04 +

Re: Efficient Formatting

2004-07-21 Thread Randal L. Schwartz
> "John" == John \ Kent <[EMAIL PROTECTED]> writes: John> Something like John> printf "%8d" * 10, @numray; printf "%8d " x @numray, @numray; That's even in the answers of the llama book. You need a llama book. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Re: Serving up a pdf file

2004-07-21 Thread Philipp Traeder
On Wednesday 21 July 2004 HH:53:19, David Arnold wrote: > All, Hi David, > > I have a page with a link "Quiz1". > > When the user clicks on the the link, a perl script will be summoned that > will populate forms of a pdf document. > > Now, I could create a new page at this point with a link to the

Serving up a pdf file

2004-07-21 Thread David Arnold
All, I have a page with a link "Quiz1". When the user clicks on the the link, a perl script will be summoned that will populate forms of a pdf document. Now, I could create a new page at this point with a link to the newly created pdf, but could someone suggest a technique where I simply send th

Re: Slow SFTP rate through perl script.

2004-07-21 Thread Wiggins d Anconia
> > Hi, > > I have a script which downloads a file from a sftp server. But it takes > almost 2-3 hours to download a file of 40mb.. while I am able to download > the same file though SSH Client in 15-20 minutes. Any clues why it is > happening so.. > Are you using Net::SFTP?? I hit the same

Re: RegEx Question

2004-07-21 Thread Jenda Krynicky
From: Mike Dillinger <[EMAIL PROTECTED]> > --- Original Message > From: Zysman, Roiy <[EMAIL PROTECTED]> > > ZR> Is there a way to extract a filename out of a path string using > just one ZR> RegEx and not using the split function ? > > ZR> For Example, I want to extract foo.txt from /my/long/pat

RE: Efficient Formatting

2004-07-21 Thread Ed Christian
Kent, Mr. John (Contractor) wrote: > Greetings, > > Want to print out a formattted line of numbers > > Is there a way to avoid having to: > >> printf "%8d %8d %8d . ten times",$num1,$num2,$num3, ... , >> $num10; ? > > Something like > printf "%8d" * 10, @numray; > How 'bout: printf "%8d

Efficient Formatting

2004-07-21 Thread Kent, Mr. John \(Contractor\)
Greetings, Want to print out a formattted line of numbers Is there a way to avoid having to: >printf "%8d %8d %8d . ten times",$num1,$num2,$num3, ... , $num10; ? Something like printf "%8d" * 10, @numray; Thank you, John Kent -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

Re: Problem with compiling a script

2004-07-21 Thread James Edward Gray II
On Jul 21, 2004, at 8:47 AM, Paul Smith wrote: Bingo, James! Sorry for my ignorance, but I am just beginning with Perl. Not a problem. Brand new to Perl and already using strict, you're off to the perfect start. Welcome. James -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

Re: Problem with compiling a script

2004-07-21 Thread Prasanna Kothari
Hi, Qualify the variable's in your perl script, since the script uses strict(use strict). For Eg: declare $greeting as "my $greeting" or comment "use strict" and that should work. Paul Smith wrote: Dear All I am trying to run the script below, but I always get the following error: [EMAIL PROTEC

Re: Problem with compiling a script

2004-07-21 Thread Paul Smith
Bingo, James! Sorry for my ignorance, but I am just beginning with Perl. Paul James Edward Gray II wrote: On Jul 21, 2004, at 8:35 AM, Paul Smith wrote: I am trying to run the script below, but I always get the following error: [EMAIL PROTECTED] scripts]$ secondperl Global symbol "$greeting" requ

Re: Problem with compiling a script

2004-07-21 Thread James Edward Gray II
On Jul 21, 2004, at 8:35 AM, Paul Smith wrote: Dear All I am trying to run the script below, but I always get the following error: [EMAIL PROTECTED] scripts]$ secondperl Global symbol "$greeting" requires explicit package name at /home/paulus/scripts/secondperl line 6. Global symbol "$greeting"

Problem with compiling a script

2004-07-21 Thread Paul Smith
Dear All I am trying to run the script below, but I always get the following error: [EMAIL PROTECTED] scripts]$ secondperl Global symbol "$greeting" requires explicit package name at /home/paulus/scripts/secondperl line 6. Global symbol "$greeting" requires explicit package name at /home/paulus/s

Re: Isolating a word with a certain pattern

2004-07-21 Thread Paul Smith
Prasanna Kothari wrote: Have a look at "\w" Refer: http://www.perldoc.com/perl5.8.4/pod/perlrequick.html I am trying to write a script to identify all words having a certain pattern in a text file. Is there in Perl a direct way of isolating a word with a certain pattern? Or has one to check all c

Re: recursive grep for Windows

2004-07-21 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > "Perl.Org" wrote: > > > > Can anyone share a script that recurses a filesystem for files > > containing one or more patterns? Seems like it would be easy to > > write but if it's already out there... > > This will probably work: > > #!/usr/bin/perl >

Re: find out who was online at a given time

2004-07-21 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > I have a database (mysql 4.0) with radius log entries for each day, we > receive emails about Acceptable Use Abuses and must figure out exactly > who was online with a certain IP address when the abuse occurred. As > you will see below there are multiple starts and stops f

Re: search and replace array variables contents

2004-07-21 Thread Prasanna Kothari
Hi, For replacing the contents of an array : This code snippet replaces the string "MODIFIED" by "MOD" foreach(@arr) { s/MODIFIED/MOD/g; } foreach(@arr) { print "$_\n"; } This is a round about way of assigning values of one array to another. #!/usr/bin/perl -w @arr1 = ("This","is","something","coo

Re: Isolating a word with a certain pattern

2004-07-21 Thread Damon Allen Davison
Hi Paul, I'm not entirely sure of what you mean by "isolating" a word, but Perl programmers often use regular expressions to locate and manipulate words. You can look at 'perldoc perlre' for more info on regular expressions and 'perldoc perllocale' for information on making the regular express

Re: Isolating a word with a certain pattern

2004-07-21 Thread Prasanna Kothari
Have a look at "\w" Refer: http://www.perldoc.com/perl5.8.4/pod/perlrequick.html Paul Smith wrote: Dear All I am trying to write a script to identify all words having a certain pattern in a text file. Is there in Perl a direct way of isolating a word with a certain pattern? Or has one to check

Isolating a word with a certain pattern

2004-07-21 Thread Paul Smith
Dear All I am trying to write a script to identify all words having a certain pattern in a text file. Is there in Perl a direct way of isolating a word with a certain pattern? Or has one to check all characters, bearing in mind that a word is a string delimited by two spaces? Thanks in advance,

Re: Problem with highlighting a word

2004-07-21 Thread Paul Smith
Paul Kraus wrote: cpan search Term::Ansi I would like to know how to print a line of text to the console with a specific word highlighted in a way such that the foreground color is exchanged with the background colour. Any ideas? Thanks, Paul. That is precisely what I was looking for. Paul -- To