Re: Image Dimensions

2007-01-21 Thread Randy J. Ray
I wrote to the original poster, but I'll share it here as well.

The module uses the AutoLoader package. The easiest way to get around the
problem, assuming that you can't install the package to a local location, is to
remove the use AutoLoader line, and the __END__ line later in the file.

Randy
-- 

Randy J. Ray  Sunnyvale, CA  http://www.rjray.org   [EMAIL PROTECTED]

Silicon Valley Scale Modelers: http://www.svsm.org
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Extremely fast concat required

2006-11-11 Thread Randy J. Ray
 I need a fast concat solution. the following works, but it is extremely slow 
 and
 it stutters. I am not replicating values, each value that is concatonated is
 unique- the following is example does not illustrate this.

The .= operator is one of Perl's slowest. It generally has to allocate a
completely new SV (internal data structure for scalars), copy over the original
string, then append the new content. And you're appending *twice*, for each
iteration. At least express # . $anewvalue as #$anewvalue.

If memory is not an issue, the following would be significantly faster:

my $count = 0;
@pmem::arr = ();

for(0..1125000)
{   
push(@pmem::arr, #$anewvalue); #$anewvalue is random; 
$count++;
print $count,\n;
}
$pmem::arr = join('', @pmem::arr);

I have no idea what would be causing the stuttering, however.

Randy
-- 

Randy J. Ray  Westminster, COhttp://www.rjray.org   [EMAIL PROTECTED]

Silicon Valley Scale Modelers: http://www.svsm.org
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: returning values/information from perl apps to php apps..

2004-10-04 Thread Randy J. Ray
the issue i'm having is that perl only seems to allow an app to have an
'exit' value of a short int. i need to return values that might be multiple
arrarys. should i simply write the perl return values into an output file,
and read the output vars from the output file in the php file...
I believe that PHP has facilities for executing external processes and saving 
the text of the output (I've done just a sprinkling of PHP, so I'm limited 
there). But if that is the case, there is nothing preventing you from having 
the Perl application print out the desired data in a structured format 
(comma-separated values, tab-separated, or even mock-XML) and having the PHP 
then parse it. Indeed, if you output it as XML, I believe that PHP has classes 
built-in that would allow you to effectively go straight to having a DOM 
representation of the data.

Randy
--
[EMAIL PROTECTED]  http://www.rjray.org http://www.svsm.org
Always code as if the guy who ends up maintaining your code will be a violent
psychopath who knows where you live.  -- Rick Osborne
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: List excel sheets

2004-01-23 Thread Randy J. Ray
I'm trying to list all the sheet contained in a single excel file, in order build a script for 
split a single excel multi-sheet in more single sheet excel files using sheet name as file name. 
The sheet number and sheet name are always different.
I can't find anything regarding sheet in perl documentation.
Look at Spreadsheet::ParseExcel in CPAN.

Randy
--

Randy J. RayCampbell, CAhttp://www.rjray.org   [EMAIL PROTECTED]
Silicon Valley Scale Modelers: http://www.svsm.org

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: ucfirst lc question

2003-07-11 Thread Randy J. Ray
On 2003.07.11 12:32 Erich C. Beyrent wrote:
Hi there,

I was hoping someone could come up with an efficient way of doing a ucfirst
lc on each word in the block below:
1{0e}TRUE DREAM{0e}6-1{0e}{0e}4{0e}SP'S SLIM SHADY{0e}10-1/l
2{0e}HARLEIGH GIRL{0e}8-1{0e}{0e}5{0e}FLYING SWEET AMY{0e}8-1/l
3{0e}REKO THEODORE{0e}7-2{0e}{0e}6{0e}MOON MT CHEETAH{0e}5-2/l
4{0e}SP'S SLIM SHADY{0e}10-1{0e}{0e}8{0e}JUST SO YOU KNOW{0e}9-2/l
$block =~ s/([A-Z']+)/ucfirst lc $1/eg;

1{0e}True Dream{0e}6-1{0e}{0e}4{0e}Sp's Slim Shady{0e}10-1/l
2{0e}Harleigh Girl{0e}8-1{0e}{0e}5{0e}Flying Sweet Amy{0e}8-1/l
3{0e}Reko Theodore{0e}7-2{0e}{0e}6{0e}Moon Mt Cheetah{0e}5-2/l
4{0e}Sp's Slim Shady{0e}10-1{0e}{0e}8{0e}Just So You Know{0e}9-2/l
Note that this turns SP'S into Sp's. If you can do without the ', you 
would probably get prettier output.

Randy
--

Randy J. RayCampbell, CAhttp://www.rjray.org[EMAIL PROTECTED]
Silicon Valley Scale Modelers: http://www.svsm.org
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs