|
|
Up |
|
|
  |
Author: Jørn Dahl-StamnesJørn Dahl-Stamnes
Date: Dec 20, 2007 23:21
Hello folks,
I'm trying to install the DBD::mysql, but it failes. It have done this
before but after my system disk crashed I had to reinstall Fedora Core 4
(yes, I know it is a bit old).
I do a 'cpan -i DBD::mysql'. It claim that my AMD 64-bit prosessor does not
support x86-64 instruction set... which I find a bit odd.
What can be wrong?
Checking if your kit is complete...
Looks good
Using DBI 1.48 (for perl 5.008006 on x86_64-linux-thread-multi) installed
in / usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi/auto/DBI/
Writing...
|
| Show full article (1.88Kb) |
|
| |
12 Comments |
|
  |
Author: dn.perldn.perl
Date: Dec 20, 2007 22:33
I create an excel file 'myfile.xls' using WriteExcel module. It has a
tab named 'Name1', and its first (say) 10 rows have some data.
I would like to reopen this sheet for over/writing, and write a string
'new string' to its cell (10, 1). Or overwrite cell (2,2) with string
'new string'.
Now I can open a new excel sheet for writing, parse the old file cell
by cell, copy each cell to the new file's sheet(s), and add a new
string to a 'new' cell, and overwrite a copied cell, and then rename
the new sheet as 'myfile.xls'. But I am interested in knowing whether
the module WriteExcel (or a Win32 module) allows me to reopen an
existing excel file for over/writing.
TIA.
|
| |
|
| |
3 Comments |
|
  |
Author: John W. KrahnJohn W. Krahn
Date: Dec 20, 2007 21:25
Sniff wrote:
>
> I have been working with Perl for a few months now and in my latest
> program I decided to give Perl OO a try. :-)
>
> In an object I'm trying to use a Filehandle (or Glob) which is uses to
> communicate with a child. I have been trying to keep these handles in
> an instance variable but it doesn't seem to work. I have tried a few
> different ways but I think I'm having issues dereferencing the
> variables.
>
> Here are some of the ways I have tried to do this:
>
> In my class constructor I do this:
>
> my $fhw = *write{FILEHANDLE};
*write{FILEHANDLE} is the 'FILEHANDLE' (or 'IO') slot in the symbol
table of the 'write' package variable so are we to assume that you used
open( write, ">filename" ) to create the filehandle?
|
| Show full article (2.42Kb) |
|
5 Comments |
|
  |
Author: John BokmaJohn Bokma
Date: Dec 20, 2007 20:52
Please no editor war, but I am curious, what's the editor of choice you're
using to write Perl, and why (if you want to share).
I am currently using Textpad, but in the very near future I am moving to
GNU/Linux. I've some experience with using vi(m) for editing work, and
have printed both the emacs and vim manual, but not sure which one to
start reading first.
I've had a short peek at Komodo Edit, but considered the start up time way
too high. Ages ago I had a peek at Eclipse, but not sure if I am the IDE
kind of guy (I manage quite ok with a "perldoc" keymark in Firefox, and
perldoc on the cli most of the time).
|
| |
|
25 Comments |
|
  |
Author: David CombsDavid Combs
Date: Dec 20, 2007 19:38
>Give 2 string list such as: a..b and 1..3, i want to get a list which
>is (a1, a2, a3, b1, b2, b3). Is there an elegant way in perl to
>fullfill this withou using loop BLOCK? Or Is there a elegant one line
>expression to get this?
Lots of neat solutions to *this* problem in this thread!
Now, how about generalizing it to eg what csh, etc, has:
{a, b, c, {e, f, g}{1,2}, x}{" hello", "goodbye"} etc
How to even *approach* this problem, or even *think* about it.
A whole set of coroutines or generators or something?
Any ideas?
Thanks
David
Not that I really need a solution
-- seems to me
like a very interesting problem, various possible data structures,
various possible control structures, ...
|
| |
|
1 Comment |
|
  |
Author: aa
Date: Dec 20, 2007 16:57
to study the frequency of words composed of {a,b,c,d,e}, how can i tell perl
program to generate the associative array of (aaaaa, aaaab, ..., caaaa, ...,
eeeee) for me instead of declaring it explicitly?
Then instead of counting the occurrence of aaaaa but the co-existence, say,
aaaaabcdea or aaaaaaaaab, how can i combine the advantage of regular
expression with this associative array?
|
| |
|
4 Comments |
|
  |
Author: PerlFAQ ServerPerlFAQ Server
Date: Dec 20, 2007 12:03
This is an excerpt from the latest version perlfaq6.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .
--------------------------------------------------------------------
6.6: How can I make "\w" match national character sets?
Put "use locale;" in your script. The \w character class is taken from
the current locale.
See perllocale for details.
--------------------------------------------------------------------
The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.
|
| Show full article (1.17Kb) |
|
no comments
|
|
  |
Author: AbbleAbble
Date: Dec 20, 2007 08:00
I get:
"Bizarre copy of HASH in aassign at DiskSpeeds.pl line 10."
when I do:
use strict; use English; use warnings;
use Time::HiRes;
use threads;
use threads :: shared;
use Net::Ping;
my( %%Times, %%Samples, %%Time, %%Avg ) : shared = 1; ## line 10
my( @Vols, $Begins );
Any ideas???
|
| |
|
5 Comments |
|
  |
Author: PerlFAQ ServerPerlFAQ Server
Date: Dec 20, 2007 06:03
This is an excerpt from the latest version perlfaq5.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .
--------------------------------------------------------------------
5.35: Why doesn't glob("*.*") get all the files?
Because even on non-Unix ports, Perl's glob function follows standard
Unix globbing semantics. You'll need "glob("*")" to get all (non-hidden)
files. This makes glob() portable even to legacy systems. Your port may
include proprietary globbing functions as well. Check its documentation
for details.
--------------------------------------------------------------------
|
| Show full article (1.34Kb) |
|
no comments
|
|
  |
|
|
  |
Author: Ferry BolharFerry Bolhar
Date: Dec 20, 2007 03:10
Good day,
has anyone experience with the modulen named in the subject, especially
with its SetServiceBits() function?
A service can use this function to declare a computer as "responsible"
for a specific task (for example, as a Microsoft SQL Server) by setting
a particular bit given as argument. There are, however, 10 bits available
for user-specific purpopes.
I want to use this function to register systems on which a special service
is installed. Using the Win32::NetAdmin::GetServers() function, I could
then specify the approbiate bit in its $flag argument to obtain just a list
of systems on which my service is installed:
In my service:
use Win32::Daemon;
...
Win32::Daemon::SetServiceBits(USER_SERVICE_BITS_1);
In the script to lookup for systems running my service:
|
| Show full article (1.57Kb) |
|
no comments
|
|
|
|
|
|
|