On Sunday 04 November 2001 01:02, nafiseh saberi wrote:
> I see in many source that...use print <<"TABLE";
> when want to work with html in cgi...
> but I dont find this syntax of print ( print <<) in any document of
> perl.. why ?!!
This is called a "Here document". I don't have my camel
On Sunday 23 September 2001 02:20, Zysman, Roiy wrote:
> Can any one show me a way on how to use associative arrays to hold array
> pointers,and how to modify the arrays (not the associativeones)
Well, I suppose one could give examples here, but you're going to be best
off if you read about it y
Saran,
On Friday 21 September 2001 15:33, Kumar wrote:
> I have several files written in perl and batch files. Here is the problem
> i'm facing, i was unbale to kickoff builds by telneting it. Its trying to
> access local files rather than to the files in the server. when ever i
> type in the loc
On Wednesday 05 September 2001 17:26, Linux User wrote:
> One software package I downloaded is supposed to start with a perl
> script, but it doesn't.
>
> I created the necessary config file for the program made it executable,
> and copied it into /usr/bin
> yet when I invoke the program it will
On Tuesday 28 August 2001 00:51, Sunthari wrote:
> 1. What should I do , if I want to read each line of
> text with the "search word". Should I put the
> occurence of search word in an array ? (I'm not so
> sure).
Are you reading in a line at a time and looking for a particular word in the
line?
On Friday 24 August 2001 13:15, Anand wrote:
> to snoop various TCP services, gather network traffic statistics by
> source/destination/protocol and for unpacking the contents of IP tunnels.
> Something similar to a Network Monitor. Basically I want to monitor a port
> activity.
>
> Does anyone kn
On Friday 24 August 2001 13:17, Anand wrote:
> I am also looking for a similar module that will allow me to monitor a TCP
> port. If you know any module that can perform the function, could you
> please let me know?
You want something that will sit on a port? Look at the Perl Cookbook,
recipe 1
On Thursday 23 August 2001 20:24, Anand wrote:
> I downloaded a package that was mainly to be used in Linux environment. I
> need the same package in Win2K. I tried to run nmake since I am having C++
> installed in my system. But, I get an error. Is it possible to install the
> packages that are a
On Thursday 23 August 2001 20:20, Gupta, Ashish wrote:
> I open lots of file descriptors in a script.
> At one point, I want to close all the opened file descriptors (except for
> stdin, stdout, stderr).
> Is there a way to close all the opened file descriptors without having a
> list of the hand
On Wednesday 22 August 2001 11:31, Troy Denkinger wrote:
> On Wednesday 22 August 2001 11:58, webmaster wrote:
> > #!/usr/bin/perl
> > $REPORT_file="report.htm";
> > $ imput_file=$ARGV[0]||'imput.dat';
> > unless (-e $imput_file)
> &g
On Wednesday 22 August 2001 13:06, Troy Denkinger wrote:
> If you mean assigning like this:
>
> %test = undef;
Replying to myself Okay, I spent more time looking at this. Here's what
I see:
#!/usr/bin/perl
use warnings;
use strict;
us
On Wednesday 22 August 2001 13:40, Mark Maunder wrote:
> This is probably an oldie, but assigning an undef to a hash creates a hash
> with a single element (which I'm guessing is undef). Isn't this counter
> intuitive. I would have expected the hash to be empty if the undef that is
> assigned is i
On Wednesday 22 August 2001 11:58, webmaster wrote:
> #!/usr/bin/perl
> $REPORT_file="report.htm";
> $ imput_file=$ARGV[0]||'imput.dat';
> unless (-e $imput_file)
> {
> die "$0: error:missing file: $imput_file";
> }
> open (IN, $imput_file) or die "$0 : error: $imput_file: $!";
All of this (
On Thursday 16 August 2001 16:16, F.H wrote:
> Hi there,
> Can you use in a perl script a module with an argument. something like
> use mymodule -myargument;
>
> I get this message: "-myargument" is not exported bt the mymodule module.
> I tried in the module this
> @mymodule::EXPORT = qw(myargume
On Tuesday 14 August 2001 11:56, Bob Showalter wrote:
> Or, from perldoc perldata:
>
> If you evaluate a hash in scalar context, it returns false if the
> hash is empty. If there are any key/value pairs, it returns true; more
> precisely, the value returned is a string consisting of the num
On Tuesday 14 August 2001 10:36, John Sands wrote:
> Is there a simple way to know whether a hash has items in it? Like using
> @ARRAY in a scalar context gives the size of an array. Or using $#ARRAY
> gives the last valid index.
Calling keys() on the hash will return a list of the keys in the ha
On Tuesday 14 August 2001 09:23, John Blaze wrote:
> printstatus" command and prints it out to a webpage. I dont know if its too
> advanced but any input from you guys would be great.
You could put the sudo command in back quotes and capture the output to a
straight text file. Load that text f
Randal,
On Monday 13 August 2001 14:10, Randal L. Schwartz wrote:
> Troy> I'm not sure I would call Perl a mixture of many languages, though it
> has Troy> adopted features from other languages. And calling Perl an
> OOP-based Troy> language might be overstating it, though I do like Perl's
> OOP
Allison,
On Saturday 11 August 2001 12:26, Allison Davis wrote:
> I am new to the list and just starting to learn perl. Can anyone tell me
> how to process a form into a text delimited file or even what a text
> delimited file is. I hope this isn't a stupid question.
There are no stupid questi
On Thursday 09 August 2001 10:32, [EMAIL PROTECTED] wrote:
> "Syntax error at perl.txt line 8, near "$x".
> Execution of perl.txt aborted due to compilation errors."
>
> $x=getc(INFILE);
> while($x!=eof(INFILE){
You'e missing a closing paren here.
However, even when I fix that this doesn't seem
On Wednesday 08 August 2001 13:40, Ron Woodall wrote:
> How do I take a heredoc section and write it to an array? Any suggestions?
Hmmm, at the risk of not being helpful, can you explain what it is you're
wanting to do?
If you're wanting to save strings to an array and then iterate over t
On Monday 06 August 2001 22:26, Qiang Qiang wrote:
> Can I use a pointer as key of a hash? I wanted to do this way however, it
> failed and output nothing. Then I change to use the content of the pointer
> as key, it works.
Can you post a bit of code illustrating what you were trying to do? Th
On Monday 06 August 2001 14:58, Tom Malone wrote:
> I hope that I did not violate some rule of list etiquette with my messages
> about writing Perl scripts for GAIM ("GAIM", "GAIM && Perl", and "Perl
No, but you're asking a very specialized question that is as much about GAIM
as about Perl.
You
On Wednesday 01 August 2001 23:59, jeffl wrote:
> !/usr/bin/perl
Once I changed the above to
#!/usr/bin/perl
your script and module worked for me. If that doesn't fix it, run the
script by invoking the perl interpreter:
perl test.pl
and see what happens.
Regards,
Troy
--
To unsubscrib
On Wednesday 01 August 2001 19:34, Peter wrote:
> i have a new script that i put in the same directory as
> other working scripts, however when i try to execute
> i keep getting a "cgiwrap error: execution not permitted
> ..script file not found"
Hmmm, well, this is not a perl question, really.
to create reports, do look at the Format information that's available.
perldoc perlform
will give you a chunk and there's a bunch of info in the Camel book, as I
recall (mine's at work).
Text::Autoformat is cool, but I don't think it's what you're looking
On Tuesday 31 July 2001 15:14, mlists wrote:
> How can you tell what version of a Perl Module you're using? i.e. CGI.pm
Hopefully the kind author has defined the $VERSION variable in the module.
Thus:
print $CGI::VERSION;
will give you the version for CGI.pm.
Regard
rence to @temp. When you undef
it, you're undefing the array that the reference in array points to.
In any event, I can't figure out why you'd want to do what I think it is
you're trying to do. There certainly may be a vaild reason for it, but there
may be a better soluti
Are there any modules I should be looking at that could make this job
> easier?
Quite likely, once we know what it is you're trying to do exactly.
Regards,
Troy Denkinger
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
) = @_;
You can access the values in the references like this:
$one->{'apple'} # gives you the value 'red'
$four->{'pomegranate'} # gives you the value 'red'
I hope that's a clear explanation.
perldoc perlref
for more information.
Regards,
Troy Denkinger
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e to open the data file, process it a line at a time,
verify the data is good and then write it out as you go. At the very least,
I'd get rid of this @data array which seems to be unnecessary to me.
Anyway, it works as is but you could run into some problems down the line.
As an experiment, I added "use strict" and it only took me about a minute to
satisfy it. So, do give it a try.
Regards,
Troy Denkinger
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
you don't have two arrays here, you have a single
hash with a key and a value. The key is the domain and the value is the
action to take.
So, once you're done, you can just write this hash back to your file and
you're done. I'm not sure what the end bit of your progr
foreach ( @$array_ref ){
print $_, ", ";
}
print "\n";
}
Since you've given the keys in the hash the same names as the arrays, you can
use those keys to access the array contents.
If I've misunderstood the question, please give some more deta
rnals.
To see the autovivification come back, uncomment the assignment to index 2.
I hope I haven't confused the issue.
Regards,
Troy Denkinger
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
34 matches
Mail list logo