Chas Owens wrote:
If we are going to pick nits then it should be
grep -c employee fn
Note that grep -c counts matching *lines*. There is no formal
requirement that these elements appear on separate lines.
Here's a slightly more complex Perl one-liner that counts *occurences*
perl -lne
Sky Blueshoes wrote:
What is the sequel statement to clear an entire table using DBI?
It depends on your database, but typically:
$dbh-do('delete from some_table');
Some databases support TRUNCATE:
$dbh-do('truncate some_table');
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Chas Owens wrote:
On 3/8/06, Eugeny Altshuler [EMAIL PROTECTED] wrote:
snip
local $/; # to slurp the file at once
my $joined=;
...
Be careful with the setting of $/. In small scripts like this one it
is not very dangerous, but in larger scripts in can cause all manner
of bugs if not properly
[EMAIL PROTECTED] wrote:
hi, perlers,
Is there a simple way to get the current index of an array in loop
statement? the procondition is you cannot get this information from
array element. For example
#!usr/bin/perl
my @arr = qw/a b c d e/;
for(@arr)
{
print The No.?? element is $_\n;
}
Tommy Grav wrote:
print $refstars[1][0] ; # - This is line 38
However this code returns an error I do not understand
Missing right curly or square bracket at refstar.pl line 38, at end
of line
syntax error at refstar.pl line 38, at EOF
Execution of refstar.pl aborted due to
a b wrote:
Here i want to execute one and then execute another but don't wait for
previous command i.e.something in background but im unable to do it.
see:
perldoc -q 'How do I start a process in the background?'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Johannes Ernst wrote:
I realize why it does that. I'm asking whether I can have something
higher-level that works for objects on the abstraction level where one
usually looks at an object.
Data::Dumper is designed to produce Perl source code that can be eval'd
to reconstruct the object. So
Ken Perl wrote:
what is the difference of :: and - in this statements?
$authInstance = Operation::Auth::getInstance($session,$u-authMethod,$u-userId)
This is a subroutine call, passing 3 arguments.
$authInstance = Operation::Auth-getInstance($session,$u-authMethod,$u-userId)
This is
Jeff Pang wrote:
The question I want to know is,when the 'close()' call happened,if it should generate a 'FIN' and send it to another end?If it's true,then at the server end,when it receive the 'EOF' coming from client,it can delay for some time to call 'close()',so the 'FIN' should not be sent
jm wrote:
i've asked oracle's forums and gotten nothing useful, so hopefully
someone here can help...
i have scripts that connect to mysql; they need to connect to an
oracle server. i've tried installing DBD::Oracle from cpan, and get
an error message about The ORACLE_HOME environment
jm wrote:
On 2/9/06, Bob Showalter [EMAIL PROTECTED] wrote:
I think you have enough software. If you can run SQL*Plus, you should be
OK. Try using just /usr/lib/oracle/10.2.0.1 or
/usr/lib/oracle/10.2.0.1/client as your ORACLE_HOME. Also, be sure to
look at the README's with the DBD::Oracle
Stephen Le wrote:
I'm writing a download manager in Perl and using the LWP library of
Perl modules.
Is there any way I can save the contents of a HTTP::Response object
directly to disk? I don't want particularly large requests to be
cached into memory.
Yes. Look at the documentation for
[EMAIL PROTECTED] wrote:
...
My question is how to access $dbaccess variable (object) defined and
initialized in test.pm within test2.pm module?
If $dbaccess is delared with 'my' in test.pm, you cannot directly access
it from another file. You have two basic options:
1. Provide an accessor
Michael Weber wrote:
Greetings!
I am not completely understanding how perl parses quotes.
Here is the line I want to execute:
exec $command $cmd_msg;
The variable $command is an executable shell script test.sh
The problem comes in the $cmd_msg variable.
This contains a line from my log
radhika wrote:
Hi,
I have a snippet of code as below.
Even when I return 0 or '', why does @blocks evaluate to true?
If rows returned are 0, then if(@blocks) should evaluate to false, correct?
...
sub do_something
{
my @row = @_;
return @row if(@row);
return '';
}
@blocks
hien wrote:
dear all,
i am trying to check if there are any files named file* (e.g.
file_001.txt file1.doc) in my directory.
if( -e file* ) { print(true\n); } # this doesn't work
else { print(false\n); }
if( -e m/^file/ ) { print(true\n); } # this doesn't work either
else { print(false\n);
Wolcott, Kenneth A wrote:
Hi;
It would be really nice if there was a clear, precise, concise,
accurate and simple instruction of how to install Perl modules locally
(non-privileged accounts) on Windows systems.
http://www.cpan.org/misc/cpan-faq.html#How_install_Perl_modules really
Gladstone Daniel - dglads wrote:
What would be the simplest way to remove leading and trailing blanks
from a user input?
To remove just blanks (but preserving possible trailing newline):
s/^ +//, s/ +$// for $input;
To remove all whitespace:
s/^\s+//, s/\s+$// for $input;
I like this
Anders Stegmann wrote:
Hi!
Why doesn't this work?
Aargh! *Please* see http://perl.plover.com/Questions4.html
You're expecting us to read your mind, so here goes...
use strict;
use warnings;
my %result_hash = qw(foo bar);
dbmopen(%result_hash, BB, 0666);
BB needs to be
Andrej Kastrin wrote:
Hi all,
I have the file, which looks like:
*RECORD*
*ID*
001
*TITLE*
Here is title number one.
*ABSTRACT*
First sentence of the abstract. Second sentence of the abstract...
Second line of the abstract.
*RECORD*
*ID*
002
*TITLE*
Here is title number one.
*ABSTRACT*
First
Grant Jacobs wrote:
I want is
the whole command *line*, not the portion of it that evoked the script,
the latter being the individual *command* within the command
line--confusing enough ;-) ? If I issue the example I gave in my OP:
echo -n Starting... ; more some-stuff | \
doStuff.pl -
Jeff Pang wrote:
Hi,bob,
You said:
3. It will probably be faster to use a single regex of the format:
/pata|patb|patc|patd/
In fact maybe you are wrong on this.
Darn. First time this year :-)
Based on my test case,the RE written as below:
/pata/ || /patb/ || /patc/ || /patd/
is
Jeff Pang wrote:
hi,lists,
I have two perl scripts as following:
a.pl:
#!/usr/bin/perl
use strict;
my @logs = glob ~/logs/rcptstat/da2005_12_28/da.127.0.0.1.*;
foreach my $log (@logs) {
open (HD,$log) or die $!;
while(HD){
if (
($_ =~ /×¢²á/o) ||
($_ =~ /Õ÷ÎÄ/o) ||
($_ =~
[EMAIL PROTECTED] wrote:
The issue:
I have a routine which builds a regex and 'knows' which paren matches to use
afterwords. For instance after a line such as:
use strict;
my $data =~ m/^(\S+)\s+((\S+\s+)?(\S+))$/;
the routine 'knows' it wants $1 and $4. Another pass through the regex will
Brahadambal S wrote:
Hi,
Could anyone tell me how to execute a .bat or .exe file through Perl?
i.e, the perl code should invoke the executable. Thanks so much for your
help(in advance).
Perl has two standard ways:
1) system() function, which executes an external program and returns its
exit
Randal L. Schwartz wrote:
Jeff == Jeff Pang [EMAIL PROTECTED] writes:
Jeff and we can use the _ handle to avoid stat'ing twice.
Jeff Sorry,I don't know what is _ handle.Who help explain with it
please,thanks.
It's documented. I refuse to retype the docs for a thing. :)
Specifically, see
Brian Volk wrote:
Of course I
have one more rookie question and a reference to a perldoc is just
fine. :~) If I use the following code, why do I not need to declare
the $a and the $b w/ my?
Correct. This is explained in perldoc perlvar:
$a
$b Special package variables when using
Brian Volk wrote:
Hi All~
I'm using the glob function to grab all the files in a given directory
and
then using crontab to check it every 5 minutes. Once I have the files
I'm
using the diamond operator to read every line in every file and *do
something* if the line matches. Here's my
Gomez, Juan wrote:
Hi
In VB is there a way to execute a perl script ?
This isn't really a Perl question; you'll get a better response on a VB
list.
I think the function you want is called Shell(), but I'm not positive.
(If your Perl script is a CGI script on a web server, then the
John W. Krahn wrote:
if ( $2 128 ) {
$low{ $1 }++;
}
else {
$high{ $1 }++;
}
$total{ $1 }++;
Why track all three? You could just track (say) low and total, and
derive high as (total - low) at print time.
--
To unsubscribe, e-mail: [EMAIL
Frank Bax wrote:
What's the correct way to trim trailing newlines from a text file that
might be either DOS or UNIX format for newlines? The docs (and my
experience) is that chomp only works properly if the text file is native
to the current operating system? I'm running on *bsd system.
[EMAIL PROTECTED] wrote:
I see. Thanks Shawn. Since we are at it, would you mind explaining a little bit
about the significance of our keyword. I have never understood it properly.
Most books that I referred to say that it's a lexically-scoped global
variable. What does that mean? I understand
TOKO wrote:
hi. I'm new at perl and am looking for solution of let script sleep for
few miliseconds. I tried sleep(0.1); but it does not work :) as I
thought.
Easist way IMO is to use Time::HiRes:
use Time::HiRes qw(sleep);
sleep(0.1);
than I found this solution: select undef,
Jennifer Garner wrote:
Hi,lists,
I have a small script,when it run,it generate much more lines and put
them
into a file.
The code for printing I writed:
map { print RESULT $_,:,$ips{$_},\n }
sort { $ips{$b} = $ips{$a} } keys %ips;
I would write it like this:
print RESULT
[EMAIL PROTECTED] wrote:
...
please give me the answers of these questions.
Chris Devers will be along shortly... :~)
--
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:
Can anyone shed some light on why this doesn't work?
$certificate = /some/where/file.pem;
$encoded = ' . sha1($_) . ';
$signed = system(`openssl rsautl -certin $certificate -encrypt -in
$encoded`);
$signed doesn't end up as a certificate signed value, it ends up as
[EMAIL PROTECTED] wrote:
I am getting an error message - Can't stat c:*.*: No such file or directory
find(\BadNames,c:\\*.*);
What should the find statement look like?
The argument should be a directory name (or multiple directories), not a
glob pattern. So use C:\\, or c:/
--
To
ZHAO, BING wrote:
I don't care how the
perl is developing and where perl is going. I am doing stuff way fancier
than what you can imagine. I am current doing a project with web input
and data anaylysis and email feedback.
You're right, that's *way* fancier than I can imagine!
I'll not
Shawn Corey wrote:
...searching perldoc really, really sucks. The only search
available is `perldoc -q keyword` and it only searches the FAQs and
then, only their questions. That's right, only the questions; the
answers are skipped!
Here's a 3-line shell script I use to grep through the core
Santosh Reddy wrote:
I want to convert all the files which are in dos format to UNIX format.
perl -pi -e 's/\cM$//' *
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
ZHAO, BING wrote:
But for Mail::Send, I downloaded this huge file
MailTools-1.67. I dug several modules out like Send.pm, Mailer.pm etc
and saved them in the current directory.
Well, that's not how you install modules. Read the README inside the
MailTools tarball. And read perldoc
ZHAO, BING wrote:
Oh, I indeed did what you'll just told me to do:
1. I first downloaded this MailTools-1.67.tar.gz
2. ungziped it
3. cd MailTools-1.67
4. Moreed Readme, followed the instructions, until the last step, make
install failed, still lots of files including a lib/ were generated.
The Ghost wrote:
my %hash = (
foo = 'bar'
);
my $name='hash';
my $key='foo';
print $name{$key};
how can I get that to print bar?
You can't, given the way you've set up %hash and $name. You're trying to
take a soft reference to a lexical variable, which won't work.
(well, you could
Dylan Stamat wrote:
No, not the routine that deals with Arrays !
I see code like the following, everywhere:
my $coolvariable = shift;
Why is a new scalar being assigned to shift ?
New to Perl... sorry for the lame question, but couldn't find an answer
anywhere.
shift is a built-in function.
Gilles wrote:
Hi,
I try do to a simple thing :
Knowing If a string like 13 exist in a string like 123
Or if 37 exist in 12356789
I tried many solutions, but never found one good so I try to do it with
loops which more difficult but not impossible
I'd like to know if with RegExp it's more
Manish Uskaikar wrote:
Hi,
I am a real newbie to databases and perl can anyone of you help me with
the packages i need to install and the sequences of functions i need to
make to connect to a database and fire queries.
DBI is the recommended approach for accessing SQL databases. You need
the
Octavian Rasnita wrote:
Hi,
I have tried the following test program:
use Finance::QuoteHist;
$q = Finance::QuoteHist-new
(
symbols= [qw(IBM)],
start_date = '01/01/1999',
end_date = 'today',
);
__END__
The program prints the following error:
ERROR: Date::Manip unable to determine
radhika wrote:
Hi,
I need to set this flag = 0x001
My code is as follows:
$flag = OBJ::HALT(0x001);
print(setting flag $flag\n);
produces: 65536
But when I say $quote-SetFlag($flag);
The flag is being set to 0;
Is that a method call?
$quote-SetFlag($flag)
I don't know what
Chris Knipe wrote:
Hi all,
Just a quick question and a couple of lines of really simple code
use Getopt::Long;
...
GetOptions ('h' = \$h,
'b=s' = \$s );
Sub ShowHelp() {
That should be
sub ShowHelp {
Perl isn't VB :)
print this is help
}
Sub
Frank Bax wrote:
I have script that takes a very long time to run - hours, sometimes even
days (even on a P2-2.8Ghz machine. After loading some data from a
database at the beginning (less than a second), the script does no i/o
until results are output at the end of script. I'd like to know
ZHAO, BING wrote:
Hi,
unlink $file works fine, but link $file doesn't even
exist,
link() does exist, but it corresponds to link(2) syscall.
perldoc -f link
The sysopen function seems to be tedious, does anyone
know how to effectively create a file in
[EMAIL PROTECTED] wrote:
I have a field that looks like this:
'modprobe: modprobe: Can't locate module char-major-10-134'
I need to add a single quote so that it looks like this:
'modprobe: modprobe: Can''t locate module char-major-10-134'
But I have no idea how to go about doing that, can I
Scott Taylor wrote:
Hi All,
I'm using XML::Simple to parse a very simple XML file and dump the data
into hashes of hashes.
The problem I'm getting, is sometimes information is blank in the XMl
file; it looks like this:
STREETNUM/
instead of
STREETNUM1234/STREETNUM
and when I print the hash:
Scott Taylor wrote:
Dermot Paikkos said:
I would also say that the source file is wrong, it should read
STREETNUM/STREETNUM
I read somewhere that blah / is correct syntax (same as blah/blah)
You are correct. The two forms are exactly equivalent. see:
Bryan R Harris wrote:
I'd like to snag all the whitespace padded numbers in $_ into an array, e.g.
in the following:
1 M_fx,-3,+2.p2 -31.4e-1 4.
I'd like to pick up only the 1, -31.4e-1, and 4.
I've tried:
$ss = qr/(^|\s)[+-]?[0-9]+\.?[0-9]*([eE][+-]?[0-9]+\.?[0-9]*)?($|\s)/;
@list =
Bryan R Harris wrote:
Bryan R Harris wrote:
I'd like to snag all the whitespace padded numbers in $_ into an array, e.g.
in the following:
1 M_fx,-3,+2.p2 -31.4e-1 4.
I'd like to pick up only the 1, -31.4e-1, and 4.
I've tried:
$ss =
Karjala wrote:
I'm writing a simple client-server application, and I'm trying to find a
way to tell if the other end of an open TCP connection has gone offline.
If the other side has closed its end of the connection, you detect this
by reading from the socket and receiving EOF (0 bytes read),
Charles Li wrote:
Hi,
I am using use Net::SMTP; to send email to multiple
people. But the recipients can not send the other
receiver emails. It just says undisclosed recipients.
How do I send email to multiple people and let them
see who is on the To list?
Include a To: header in the
Adriano Allora wrote:
ha to all,
Ha back!
I need to use a a shell-program but I cannot pass all the arguments to
this program via system() function. In other words: the program
doesn't accept all the arguments via command line: I need to open it
and write interactively some instructions.
Naji, Khalid wrote:
Hi,
Which Module could you recommend for the use of the XML (XML::Simple,
XML::Parser and XML::Writer, XML::DOM, XML::PATH...) ?
To add to what Wiggins said, I would also take a look at the XML::LibXML
family of modules, and look at SAX parsing. These are newer than some
ZHAO, BING wrote:
But, I
figured it might be a good idea to save the file for like a week then
delete it, if I know some kind of function like
clock(as wild as it can get..), date etc, so after a week or so,
the perl script would delete the file.
The classic way to do this
Jeff Pan wrote:
hi,
Is there a best way to find some lines which exists in both two files?
I usually use the Unix comm(1) utility. Its very efficient, but the input
files need to be sorted. Google for ppt comm and you can find a Perl
version.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Ranish wrote:
But the output of the code is
perl aprequest.pl
HTTP::Response=HASH(0x81e8a84)
How can I make this human readable.
print $response-as_string;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Chris Devers wrote:
while ( $tries 10 ) {
my $result = do_something_risky();
break if ( $result != 0 );
last, not break
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Tony Frasketi wrote:
Hello Listers
I'm trying to find a way to force a download dialogue box to come up
when the user clicks on a link on a web page (the link will primarily
be for htm, .txt files on the server).
Short answer is that you cannot *force* the client to do anything.
The HTTP
Denzil Kruse wrote:
Well, this is what I witnessed. I'm using a windows
computer at home. It is configured to display hidden
files. I have a red hat linux server off who knows
where that hosts my site.
I set up a perl script to set and fetch cookies, and
it does so correctly on my computer.
Luinrandir wrote:
###
Inn.pl #
##
package Inn;
Buy
{}
Sell
{}
Talk
{}
Sleep
{}
Delivery
{}
Work
{
# GameTime(.1);
# SendOff();
print qq|Well afraid I do all my own work Try another business|;
}
...
Did
Luinrandir wrote:
package Inn;
BEGIN
{}
END
{}
return 1;
An error comes up when I include the END{} but not the BEGIN{}
any clues?
Er, WTF are you trying to do? What is the error?
You can't use return outside of a sub. The normal idiom is a bare 1 to
provide a true result for
Luinrandir wrote:
My package is executing ALL subroutines when required?
why?
Since you don't show us your code, how on earth are we supposed to guess?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Peter Rabbitson wrote:
* I store dirty orders as XML in a SQL table with 2 columns - one for
the order id and another for the arbitrary XML structure. Problem once
again is that my XML can be thousands of characters long.
I vote for this option. You can use a TEXT or MEDIUMTEXT column to store
Bob Showalter wrote:
You can't use return outside of a sub. The normal idiom is a bare 1 to
provide a true result for require().
I'm wrong. You _can_ return from a do FILE construct. So there shouldn't
be an error. (suggest you remove the return anyway; it isn't normally used
Vance M. Allen wrote:
I need to know how to retrieve through Perl DBI a listing of possible
ENUM elements from a field for processing under a CGI script.
Need to know what database you're talking about. This will probably involve
querying data dictionary views or tables. Some DBI drivers also
Jeff 'japhy' Pinyan wrote:
Now you want to call the Inn::HTML() function, right? You can't
easily do it if strict is turned on. Here's one way, though:
my $glob = $main::{$Player{Location} . ::}{HTML};
$glob-();
Or just turn off strict for a sec:
{ no strict 'refs';
Christopher Spears wrote:
From what I understand, @ARGV contains invocation
arguments. Then how come I cannot access the first
element with $ARGV[0]? What would be the proper way
to do this?
Well, you can access the first element as $ARGV[0], so something else is
going on. Show us your
Guys,
I need help with an algorithm. I'm writing a program that sends a repeated
pattern of requests to a service. Each request has a weight that controls
the relative frequency with which I need to send that particular request. So
given:
foo = 1
bar = 3
I would send four requests, one of
Jeff 'japhy' Pinyan wrote:
The extreme cases are the easy ones, though. What I'd like to see are
cases like:
foo = 1
bar = 2
qux = 3
baz = 4
zip = 5
Once I know what the algorithm's outcome should be for something like
that, I think I can develop it.
Here's what I've
Matthew Sacks wrote:
Greetings,
I want to send mail from my perl code. (Boy, that's
really unusual)
I am thinking using mail::mailer.
I need a bit more info than what I have so far found
in the online documentation (perldoc -q mail).
Where I can I find some advice?
E.G., there is always
steve abrams wrote:
* code 'paraphrased' for simplicity *
Hi all,
I have a script which goes to a subroutine. Within the
subroutine, there exists:
$pid = fork;
push(@pids, $pid);
unless ($pid)
{
my $var = new Object;
if (not $var-method_that_evokes_a_child())
[EMAIL PROTECTED] wrote:
Hi all. I am attempting to install DBD::Oracle from the perl CPAN
shell. The installation script seems to assume that oracle is
installed locally. It asks me to set ORACLE_HOME to the path the
oracle is installed and to try again. Well I don't have oracle
installed
[EMAIL PROTECTED] wrote:
Could any body tell me how to get mayank from 'mayank'
$var =~ tr/'//d;
sp. by map or grep command
Those functions are not appropriate to the problem as you've described it
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Denzil Kruse wrote:
Hi,
I want my users to download a csv file. When they
left click on the link, it brings the file up within
the browswer. They can of course do a right click and
Save Target As depending on the browser.
But I don't want to fuss with instructions and
confused users.
Eliyah Kilada wrote:
Hi,
It seems that the following code gives unexpected results:
system (cd $dir_name);
system (pwd);
--- this prints the old directory name not the new one. In other
words, the previous (cd) command hasn't taken its effect!
Do anyone know why?
Each call to system()
Maxipoint Rep Office wrote:
How check DBI version on the server?
perl -MDBI -le 'print $DBI::VERSION'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Brent Clark wrote:
Hi List
I have a scenario / debate if you wish with my colleague.
The problem is I have to update a CSV file and the way I do it open
the file while reading / editting it I then send it to a temp file,
unlink the original and the rename the temp to the original file
Ken Perl wrote:
The password used to access a ftp server is stored in a text file, the
perl program gets the password from the file, the pass it to the ftp
server for logon, this is the background.
The requirement is encrypt the password store in a more secure way,
and the perl program could
Daniel Kurtz wrote:
Ooh ooh ooh! One I know!
open(COMMAND, dir |);
@files = COMMAND;
Please tell me you're kidding.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Daniel Kurtz wrote:
Bob Showalter wrote:
Please tell me you're kidding.
Why? It works. The question asked how you can do it, not the BEST way
to do it. And after a week of Perling, this was the one way I knew.
Now I know two ways. g
OK, you weren't kidding. Since you're new to Perl, you
JupiterHost.Net wrote:
How come use MODULE VERSION; works sometimes and not others?
In this case:
$ perl -mstrict -we 'use CGI 3.12;print $CGI::VERSION\n;'
CGI version 3.12 required--this is only version 3.11 at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
$ perl -mstrict
Mason Loring Bliss wrote:
On Tue, Aug 23, 2005 at 11:10:58AM -0400, Mason Loring Bliss wrote:
Hi, all! I'm learning about dealing with sockets in Perl, and I've
got a question about some unexpected behaviour exhibited by the
following test script.
In the case where I open a connection
Bob Showalter wrote:
I don't think there's any problem with IO::Socket. Even if accept
returns a socket, you should receive an EOF on that socket when you
try to read from it, which tells you that the peer has closed the
connection. I think you just need to check for both situations: an
error
[EMAIL PROTECTED] wrote:
Sorry to bother everyone, but i was working on this yesterday and i
couldn't get it to work. I guess i have the wrong syntax for passing
variables in from the command line.
Here's my script:
= crypt.pl =
#!/usr/bin/perl
my $pwd = $1;
my $seed = $2;
my
Yu Wang wrote:
Hi,
I have written a program using Gtk2 in Perl. It's the first time I
write program in Perl, so I need some help in writting the Makefile.pl
I have 1 file for main program, and 5 files for modules. Besides
that, I also have document files and some data files to be accessed
Charles K. Clarkson wrote:
Dave Adams mailto:[EMAIL PROTECTED] wrote:
Does perl allow you to conditionally include a module?
In general, you can load a module at runtime by using
'require' and manually running its import() sub routine.
require Module;
Module::import( 'Import list'
Siegfried Heintze wrote:
The following code works with perl/MySQL. If I comment the second
line, however, it does not work. No error messages and no results.
If I use the MySQL Enterprise console and type in my first SELECT
statement that includes the LIKE clause, it works.
I'm stumped. There
Victor Pezo wrote:
Hi, I am developing a program that sets passwd for any user but i
dont want the operator sets the passwd. I want to give it as a result
of a function
[EMAIL PROTECTED] victor]$ perl passwd.pl victor1
#!/usr/bin/perl
$usuario=$ARGV[0];
Brent Clark wrote:
Hi list
Would someone be so kind as to share some light on this for me.
I have the following code:
($fileName) = ($_ =~ /regexcode/o);
Which gives me the correct data.
But if I make it like so (note the () missing around the variable):
$fileName = ($_ =~
Jan Eden wrote:
Hi,
I need to store a list of month names into a hash structure such that:
$self-{monate}-{1}-{bezeichnung} = 'Januar'
$self-{monate}-{2}-{bezeichnung} = 'Februar'
etc.
Until now, I have used the rather clumsy:
@month_hash{1..12} = (Januar, Februar, März, April, Mai,
Bob Showalter wrote:
$self-{monate}{$_}{bezeichnung} = $month_hash{$_} for 1..12;
That could also be 'for keys %month_hash'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Bryan R Harris wrote:
I'd like to turn array @tmp from:
(1,2,3)
to
(1,|,2,|,3)
I'm using:
@tmp = split(' ', join( | , @tmp));
... but it seems like a waste to create a string and then split it
back up again.
I'll bet that's pretty efficient. The problem would come if
Neville Hodder wrote:
The following code creates two Input types - a file select and a
text input. The text input data is returned as expected whilst
the file select data is ignored. I have not found any references
for a CGI file select form tag in my documentation so I guess it is
not a
1 - 100 of 1624 matches
Mail list logo