Perflib
Hi Guys I'm experiencing a problem when using the Perflib library. I am only trying to query the localmachine (localhost/127.0.0.1) but sometimes it fails to create the PerfLib object. I am using the PDK 5.3 (with Perl 5.8.2) to create a service and this has been deployed on 300+ remote computers. Now and then we find a computer (usually Win2k, but sometimes XP) that can't load the software - at other times, a computer that has been succesffully running the service for months will hang. This is most troubling. In the Event Viewer we receive an error like: "The Descripton for Event ID( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: Can't call method 'GetObjectList' on an undefined value at /PerlApp/Bird/Win32.pm line 368". line 366> my $perflib = new Win32::PerfLib($server); line 367> my $proc_ref = {}; line 368> $perflib->GetObjectList($process_obj, $proc_ref); So it appears that the $perflib is not being created sometimes on some computers. Does anyone have any idea why this might be? Could a machine be locked down so that this information is unavailable? (Note that i have tried running the service under both the LocalSystem account and Administrator accounts). Any help would be most appreciated. Kind Regards Jon -- Jonathan Soong Information Services Institute of Medical and Veterinary Science (IMVS) Email: [EMAIL PROTECTED] Web : http://www.imvs.sa.gov.au Tel : +61 8 82223095 Fax : +61 8 82223147 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Using the Graphical Debugger that comes with the PDK.
Jan Dubois wrote: > On Wed, 03 Nov 2004, Beckett Richard-qswi266 wrote: > >>>Like maybe use quick eval (^E) to eval "@ARGV". >> >>Aaahhh! OK, you can slap me now ;-) >> >>I was using QuickEval on @ARGV, rather than on "@ARGV" >> >>D'oh! > > > You could also use Dump Variable (^D) if you want to invoke > Data::Dumper on a complex data structure. > > Note that the debugger in Komodo is quite a bit more featureful > than the one in the PDK. It will display the variables in a tree > control and lets you expand elements individually to drill down > into the data. Why can't you use the standard debug control statements from the console debugger in the graphical debugger ? Like changing the source file name (f filename) etc. It would be nice to at least have the ability to break in main (at first possible statement) rather than to be sitting in some module that is being loaded when you start up and be forced to step until you get back to main to set a breakpoint. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: string to time
Wagner, David --- Senior Programmer Analyst --- WGO wrote: > [EMAIL PROTECTED] wrote: > >>given a date string something like >> >>11/03/2004 09:30:27 >> >>Is there a Perl mod that will turn this into peril's time() in >>seconds from day zero? >> >>Thanks > > You would need to parse the data which you could do in two steps: > # Assumes you date/time is in $_ > @MyWorka = split (/\D/, $_); > # > # Now date and time should be in @MyWorka as > #[0]: 11 > #[1]: 03 > #[2]: 2004 > #[3]: 09 > #[4]: 30 > #[5]: 27 > > Now you should be able to feed into timelocal and have your seconds. > > Wags ;) Following through, you have to re-order a bit : use strict; use Time::Local; my $date = '11/03/2004 09:30:27'; my @d = (split /\D+/, $date)[5,4,3,1,0,2]; --$d[4]; $d[5] -= 1900; my $epoch = timelocal @d; print scalar localtime $epoch, "\n"; __END__ -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: RFC Expunge issue with Net::IMAP::Simple .95
Mark, Your suggestion did work, however the cmd id is still being passed to the IMAP server: 14 Ben EXPUNGE I messed around with the module for a while but I'm not versed well enough with packages and strictness to this level so I was never able to do something like: if ($value =~/EXPUNGE/) {my $cmd = qq["" $name $value\r\n]; } else { my $cmd = qq[$id $name $value\r\n]; } >>> Global symbol "$cmd" requires explicit package name I also tried creating a package but, that seemed to fail pretty badly. Ben -Original Message- From: Thomas, Mark - BLS CTR [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 4:54 PM To: 'Ben Conrad'; [EMAIL PROTECTED] Subject: RE: RFC Expunge issue with Net::IMAP::Simple .95 The _process_command() routine processes its 'cmd' arguments in order, so you should be able to simply reverse it. So, instead of cmd => [EXPUNGE => $box], use cmd => [$box, 'EXPUNGE'], looks like this has already been reported as a bug: http://rt.cpan.org/NoAuth/Bug.html?id=8035 Consider submitting a patch with the above change. It's easy to do and module authors love it. - Mark. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Ben Conrad > Sent: Wednesday, November 03, 2004 4:36 PM > To: [EMAIL PROTECTED] > Subject: RFC Expunge issue with Net::IMAP::Simple .95 > > > Folks, > > I'm just about done writing a script that deletes messages > older than "x" days in IMAP mailboxes. When I do a > $imap->expunge_mailbox( "$box" ) the server (via network > sniff) spits out: > > 14 EXPUNGE "Ben" >>> Net::IMAP::Simple > 14 BAD EXPUNGE Invalid Syntax >>> Ipswitch Imail server 7.04 > 15 EXPUNGE>>> Net::IMAP::Simple > 16 LOGOUT >>> Net::IMAP::Simple > 15 BAD EXPUNGE Invalid Syntax >>> Ipswitch Imail server 7.04 > > I looked at RFC 1730 (IMAP 4) and it looks like EXPUNGE is > supposed to be formatted "mbox EXPUNGE", not "EXPUNGE mbox". > I tried that in a telnet window and it worked: > > Ben EXPUNGE > * 3 EXPUNGE > * 2 EXPUNGE > * 1 EXPUNGE > Ben OK Expunge completed > > I'm not sure why the expunge on logout is failing. > > Microsoft Exchange seems to act in the same way. Is there a > way I can modify simple.pm to reorder the commands, I'm not > too familiar with modifying perl modules. > > >> from simple.pm $VERSION = '0.95'; > sub expunge_mailbox { > my ( $self, $box ) = @_; > _escape( $box ); > > return $self->_process_cmd( > cmd => [EXPUNGE => $box], > final => sub { 1 }, > process => sub { }, > ); > } > > Help! > > > > Ben Conrad > Sr. Network Administrator > 180 Old Colony Avenue > Quincy, MA 02170 > Passkey International, Inc. > [T] 617.237.8225 > [M] 617.852.6206 > [F] 617.328.1461 > http://www.passkey.com > > *The Key to Optimizing Your Group Performance* > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How to insert picture(.jpe) into mysql database?
Ed Chester wrote: In my opinion you have two choices: i) store the image in a binary BLOB field ii) store a reference to a filename in a sensible text field, and actually store the image in your normal filesystem Of these, I absolutely recommend (ii) and think that (i) is a disastrous thing to do. It will lead to large server load, much slower DB performance, more interface problems, and very large data tables. I cannot think of a single good reason to actually store an image in a mysql database, but if you have one please do post it :) maybe if you want easy portability - all you have to do is dump the db and you have the images as well i guess it depends on the performance you need. i don't know how much of a performance hit storing a few jpegs in a BLOB would actually... (i guess its different if you're storing millions..) j ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: RFC Expunge issue with Net::IMAP::Simple .95
The _process_command() routine processes its 'cmd' arguments in order, so you should be able to simply reverse it. So, instead of cmd => [EXPUNGE => $box], use cmd => [$box, 'EXPUNGE'], looks like this has already been reported as a bug: http://rt.cpan.org/NoAuth/Bug.html?id=8035 Consider submitting a patch with the above change. It's easy to do and module authors love it. - Mark. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Ben Conrad > Sent: Wednesday, November 03, 2004 4:36 PM > To: [EMAIL PROTECTED] > Subject: RFC Expunge issue with Net::IMAP::Simple .95 > > > Folks, > > I'm just about done writing a script that deletes messages > older than "x" days in IMAP mailboxes. When I do a > $imap->expunge_mailbox( "$box" ) the server (via network > sniff) spits out: > > 14 EXPUNGE "Ben" >>> Net::IMAP::Simple > 14 BAD EXPUNGE Invalid Syntax >>> Ipswitch Imail server 7.04 > 15 EXPUNGE>>> Net::IMAP::Simple > 16 LOGOUT >>> Net::IMAP::Simple > 15 BAD EXPUNGE Invalid Syntax >>> Ipswitch Imail server 7.04 > > I looked at RFC 1730 (IMAP 4) and it looks like EXPUNGE is > supposed to be formatted "mbox EXPUNGE", not "EXPUNGE mbox". > I tried that in a telnet window and it worked: > > Ben EXPUNGE > * 3 EXPUNGE > * 2 EXPUNGE > * 1 EXPUNGE > Ben OK Expunge completed > > I'm not sure why the expunge on logout is failing. > > Microsoft Exchange seems to act in the same way. Is there a > way I can modify simple.pm to reorder the commands, I'm not > too familiar with modifying perl modules. > > >> from simple.pm $VERSION = '0.95'; > sub expunge_mailbox { > my ( $self, $box ) = @_; > _escape( $box ); > > return $self->_process_cmd( > cmd => [EXPUNGE => $box], > final => sub { 1 }, > process => sub { }, > ); > } > > Help! > > > > Ben Conrad > Sr. Network Administrator > 180 Old Colony Avenue > Quincy, MA 02170 > Passkey International, Inc. > [T] 617.237.8225 > [M] 617.852.6206 > [F] 617.328.1461 > http://www.passkey.com > > *The Key to Optimizing Your Group Performance* > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: regex help
$Bill wrote: > ... and \1 is deprecated for $1. I believe that should read [thanks Greg!] "...and \1 is deprecated on the right side of s///". On the left side (as in any regexp), \1 and $1 differ. But as a holdover from sed, \1 means the same as $1 on the right side of the subst. \1 isn't the same as $1, in that s/(.)\1//; deletes duplicate chars, while; s/(.)$1//; depends upon the value of $1 - which, in this case'd be set *before* the subst got invoked. On the right hand side, $1 is what we expect (the final matched text inside the first set of parens). \1 (on the LHS) also can/will change during the course of a regex evaluation - as the parser/matcher works, \1 will take on different values during backtracking etc - though, in the end \1 is the same as $1. I've never understood it but I belive perl golfer/obfu folks can do strange and terrible things w/ the difference. a Andy Bach, Sys. Mangler Internet: [EMAIL PROTECTED] VOICE: (608) 261-5738 FAX 264-5932 "If there be time to expose through discussion the falsehood and fallacies, to avert the evil by the process of education, the remedy to be applied is more speech, not enforced silence." Justice Louis Brandeis ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RFC Expunge issue with Net::IMAP::Simple .95
Folks, I'm just about done writing a script that deletes messages older than "x" days in IMAP mailboxes. When I do a $imap->expunge_mailbox( "$box" ) the server (via network sniff) spits out: 14 EXPUNGE "Ben">>> Net::IMAP::Simple 14 BAD EXPUNGE Invalid Syntax >>> Ipswitch Imail server 7.04 15 EXPUNGE >>> Net::IMAP::Simple 16 LOGOUT >>> Net::IMAP::Simple 15 BAD EXPUNGE Invalid Syntax >>> Ipswitch Imail server 7.04 I looked at RFC 1730 (IMAP 4) and it looks like EXPUNGE is supposed to be formatted "mbox EXPUNGE", not "EXPUNGE mbox". I tried that in a telnet window and it worked: Ben EXPUNGE * 3 EXPUNGE * 2 EXPUNGE * 1 EXPUNGE Ben OK Expunge completed I'm not sure why the expunge on logout is failing. Microsoft Exchange seems to act in the same way. Is there a way I can modify simple.pm to reorder the commands, I'm not too familiar with modifying perl modules. >> from simple.pm $VERSION = '0.95'; sub expunge_mailbox { my ( $self, $box ) = @_; _escape( $box ); return $self->_process_cmd( cmd => [EXPUNGE => $box], final => sub { 1 }, process => sub { }, ); } Help! Ben Conrad Sr. Network Administrator 180 Old Colony Avenue Quincy, MA 02170 Passkey International, Inc. [T] 617.237.8225 [M] 617.852.6206 [F] 617.328.1461 http://www.passkey.com *The Key to Optimizing Your Group Performance* ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: version 5.005_03
Try this directory at ftp.activestate.com: /ActivePerl/Windows/5.005/Intel One can sign on anonymously to the above FTP site. Sample FTP session below>>>: >>> C> ftp -ni ftp.activestate.com Connected to ftp1.activestate.com. 220 carafe.activestate.com FTP server ready. ftp> user anonymous 331 Anonymous login ok, send your complete email address as your password. Password: 230 Anonymous access granted, restrictions apply. ftp> cd /ActivePerl/Windows 250 CWD command successful. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for file list. drwxr-xr-x 5 root ftp 4096 Oct 29 20:30 5.005 drwxr-xr-x 3 root ftp 4096 Oct 29 20:30 5.6 drwxr-xr-x 2 root root 4096 Oct 29 20:30 5.8 226 Transfer complete. ftp: 182 bytes received in 0.00Seconds 182000.00Kbytes/sec. ftp> cd 5.005 250 CWD command successful. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for file list. drwxr-xr-x 2 root ftp 4096 Oct 29 20:30 Alpha drwxr-xr-x 2 root ftp 4096 Oct 29 20:30 Intel drwxr-xr-x 2 root ftp 4096 Oct 29 20:30 Source 226 Transfer complete. ftp: 187 bytes received in 0.00Seconds 187000.00Kbytes/sec. ftp> cd Intel 250 CWD command successful. ftp> dir 200 PORT command successful. 150 Opening ASCII mode data connection for file list. -rw-r--r-- 1 root ftp 5114552 Jul 3 1998 APi469e.exe -rw-r--r-- 1 root ftp 5098640 Jul 11 1998 APi471e.exe -rw-r--r-- 1 root ftp 5055264 Jul 31 1998 APi500e.exe -rw-r--r-- 1 root ftp 5105072 Aug 6 1998 APi501e.exe -rw-r--r-- 1 root ftp 5165640 Aug 13 1998 APi502e.exe -rw-r--r-- 1 root ftp 4666304 Oct 3 1998 APi503e.exe -rw-r--r-- 1 root ftp 4663484 Oct 13 1998 APi504e.exe -rw-r--r-- 1 root ftp 4628253 Oct 22 1998 APi505e.exe -rw-r--r-- 1 root ftp 2469961 Nov 3 1998 APi506Update.exe -rw-r--r-- 1 root ftp 4701865 Oct 28 1998 APi506e.exe -rw-r--r-- 1 root ftp 2755931 Nov 18 1998 APi507Update.exe -rw-r--r-- 1 root ftp 4822930 Nov 14 1998 APi507e.exe -rw-r--r-- 1 root ftp 2764243 Dec 23 1998 APi508Update.exe -rw-r--r-- 1 root ftp 4888121 Dec 23 1998 APi508e.exe -rw-r--r-- 1 root ftp 2703369 Jan 7 1999 APi509Update.exe -rw-r--r-- 1 root ftp 4762160 Jan 6 1999 APi509e.exe -rw-r--r-- 1 root ftp 4895820 Feb 27 1999 APi513e.exe -rw-r--r-- 1 root ftp 5029774 Apr 7 1999 APi514e.exe -rw-r--r-- 1 root ftp 5094037 Apr 10 1999 APi515e.exe -rw-r--r-- 1 root ftp 5076803 May 17 1999 APi516e.exe -rw-r--r-- 1 root ftp 5114600 May 27 1999 APi517e.exe -rw-r--r-- 1 root ftp 1668080 Jun 29 1999 APi518Update.exe -rw-r--r-- 1 root ftp 5125800 Jun 24 1999 APi518e.exe -rw-r--r-- 1 root ftp 3169176 Aug 13 1999 APi519Update.exe -rw-r--r-- 1 root ftp 5229736 Aug 12 1999 APi519e.exe -rw-r--r-- 1 root ftp 2053976 Sep 29 1999 APi520Update.exe -rw-r--r-- 1 root ftp 5318408 Sep 29 1999 APi520e.exe -rw-r--r-- 1 root ftp 2225576 Oct 16 1999 APi521Update.exe -rw-r--r-- 1 root ftp 5462944 Oct 16 1999 APi521e.exe -rw-r--r-- 1 root ftp 2203424 Nov 2 1999 APi522Update.exe -rw-r--r-- 1 root ftp 5499648 Nov 2 1999 APi522e.exe -rw-r--r-- 1 root root 1471 Oct 29 20:30 MD5SUM 226 Transfer complete. ftp: 2216 bytes received in 0.13Seconds 17.73Kbytes/sec. ftp> pwd 257 "/ActivePerl/Windows/5.005/Intel" is current directory. ftp> bye 221 Goodbye. <<< Sample FTP session above . Hope this helps!! Sui -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of LeRoy Kemnitz Sent: Wednesday, November 03, 2004 3:37 PM To: [EMAIL PROTECTED] Subject: version 5.005_03 I am looking for a copy of perl version 5.005_03. This is the version recommended as a workaround for bug I am experienceing in Oracle opatch utility. Anyone know where I can pick one up? Thanks, LeRoy ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
version 5.005_03
I am looking for a copy of perl version 5.005_03. This is the version recommended as a workaround for bug I am experienceing in Oracle opatch utility. Anyone know where I can pick one up? Thanks, LeRoy ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Using the Graphical Debugger that comes with the PDK.
On Wed, 03 Nov 2004, Beckett Richard-qswi266 wrote: > > Like maybe use quick eval (^E) to eval "@ARGV". > > Aaahhh! OK, you can slap me now ;-) > > I was using QuickEval on @ARGV, rather than on "@ARGV" > > D'oh! You could also use Dump Variable (^D) if you want to invoke Data::Dumper on a complex data structure. Note that the debugger in Komodo is quite a bit more featureful than the one in the PDK. It will display the variables in a tree control and lets you expand elements individually to drill down into the data. Cheers, -Jan ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: string to time
[EMAIL PROTECTED] wrote: > given a date string something like > > 11/03/2004 09:30:27 > > Is there a Perl mod that will turn this into peril's time() in > seconds from day zero? > > Thanks You would need to parse the data which you could do in two steps: # Assumes you date/time is in $_ @MyWorka = split (/\D/, $_); # # Now date and time should be in @MyWorka as #[0]: 11 #[1]: 03 #[2]: 2004 #[3]: 09 #[4]: 30 #[5]: 27 Now you should be able to feed into timelocal and have your seconds. Wags ;) *** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. *** ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: string to time
> given a date string something like > > 11/03/2004 09:30:27 > > Is there a perl mod that will turn this into perl's time() in > seconds from day zero? use Time::ParseDate; $seconds = parsedate("11/03/2004 09:30:27"); if it's a UK-style date (March 11) then you change the line to $seconds = parsedate("11/03/2004 09:30:27", UK=>1); -- Mark Thomas Internet Systems Architect ___ BAE SYSTEMS Information Technology 2 Massachusetts Ave NE, Ste. 5110 Washington, DC 20212 USA > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Hon Shi > Sent: Wednesday, November 03, 2004 12:45 PM > To: [EMAIL PROTECTED] > Subject: string to time > > > > Thanks > > > > __ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
string to time
given a date string something like 11/03/2004 09:30:27 Is there a perl mod that will turn this into perl's time() in seconds from day zero? Thanks __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Debugger again.
Beckett Richard-qswi266 wrote: > Guys, > > Most of my scripts involve Tk GUIs, so once I started to use the debugger > 'properly', I've discovered that it's next to useless when Tk is involved. > > Is there a debugger that would be useful for debugging a Tk script? Did you try reverting to the commandline version and debugging from a console window ? -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Debugger again.
Guys, Most of my scripts involve Tk GUIs, so once I started to use the debugger 'properly', I've discovered that it's next to useless when Tk is involved. Is there a debugger that would be useful for debugging a Tk script? Thanks. R. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How to insert picture(.jpe) into mysql database?
Please give me some examples,thanks.Ed Chester <[EMAIL PROTECTED]> wrote: In my opinion you have two choices: i) store the image in a binary BLOB fieldii) store a reference to a filename in a sensible text field, and actually store the image in your normal filesystemOf these, I absolutely recommend (ii) and think that (i) is a disastrous thing to do. It will lead to large server load, much slower DB performance, more interface problems, and very large data tables. I cannot think of a single good reason to actually store an image in a mysql database, but if you have one please do post it :) ed cDo You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂美女明星应有尽有,搜遍美图、艳图和酷图 1G就是1000兆,雅虎电邮自助扩容!___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Using the Graphical Debugger that comes with the PDK.
> Like maybe use quick eval (^E) to eval "@ARGV". Aaahhh! OK, you can slap me now ;-) I was using QuickEval on @ARGV, rather than on "@ARGV" D'oh! Thanks, R. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Using the Graphical Debugger that comes with the PDK.
Beckett Richard-qswi266 wrote: > So if I'm debugging something like this: > > my @list = @ARGV; > > unless I add these lines to my script: > > for (@list) { > my $var = $_; > } > > I'm not going to be able to look at the contents of either array in the debugger? See my follow-up post. The debuger sucks - it should take all of the same inputs that the commandline debugger takes. (Maybe it does, but I haven't found out how yet.) -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Using the Graphical Debugger that comes with the PDK.
Beckett Richard-qswi266 wrote: > Guys, > > I've just started playing with the debugger that came with the perl dev kit, and I'm > wondering if it's possible to view the contents of an array? > > I have @ARVG, but if I evaluate it, I get 4, which I should have expected, I > suppose, but I would also like to see what the array elements are. Is this possible? I forgot to mention that my solutions had nothing to do with the PDK debugger - but should be usable somehow inside it. Like maybe use quick eval (^E) to eval "@ARGV". -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Using the Graphical Debugger that comes with the PDK.
So if I'm debugging something like this: my @list = @ARGV; unless I add these lines to my script: for (@list) { my $var = $_; } I'm not going to be able to look at the contents of either array in the debugger? R. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Using the Graphical Debugger that comes with the PDK.
Beckett Richard-qswi266 wrote: > Guys, > > I've just started playing with the debugger that came with the perl dev kit, and I'm > wondering if it's possible to view the contents of an array? > > I have @ARVG, but if I evaluate it, I get 4, which I should have expected, I > suppose, but I would also like to see what the array elements are. Is this possible? You're getting the scalar context. You can print an array via several methods : print "[EMAIL PROTECTED]"; # you'll get a space separated printout print "array contents:\n"; print "\t$_\n" foreach @array; # one element per line print join '|', @array; # pipe separated list print "\n"; use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Sortkeys=1; print Data::Dumper->Dump([EMAIL PROTECTED], [qw([EMAIL PROTECTED])]); # I usually use a ref to the array or print Data::Dumper::Dumper([EMAIL PROTECTED]); # with Data::Dumper for looks -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Using the Graphical Debugger that comes with the PDK.
Guys, I've just started playing with the debugger that came with the perl dev kit, and I'm wondering if it's possible to view the contents of an array? I have @ARVG, but if I evaluate it, I get 4, which I should have expected, I suppose, but I would also like to see what the array elements are. Is this possible? Thanks, R. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How to insert picture(.jpe) into mysql database?
In my opinion you have two choices: i) store the image in a binary BLOB field ii) store a reference to a filename in a sensible text field, and actually store the image in your normal filesystem Of these, I absolutely recommend (ii) and think that (i) is a disastrous thing to do. It will lead to large server load, much slower DB performance, more interface problems, and very large data tables. I cannot think of a single good reason to actually store an image in a mysql database, but if you have one please do post it :) ed c ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
How to insert picture(.jpe) into mysql database?
I want to manage picture via mysql database,but how to insert picture into mysql database via perl?Please give me any perl progarm code,thanks.Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂美女明星应有尽有,搜遍美图、艳图和酷图 1G就是1000兆,雅虎电邮自助扩容!___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How to obtain filesize?
All you need to get the file size is -s. I.e. $file_size = -s $file Save the following script as size.pl, and run like this: perl size.pl size.pl use strict; use warnings; my $file = $ARGV[0]; my $file_size = -s $file; print "$file is $file_size bytes\n"; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Cheung Sent: 03 November 2004 06:54 To: perl-win32-users Subject: How to obtain filesize? I have a perl program about update file from pc to mysql,but I want to limit filesize,how to obtain filesize and file type? Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 美女明星应有尽有,搜遍美图、艳图和酷图 1G就是1000兆,雅虎电邮自助扩容! ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How to obtain filesize?
Tony, Tony Cheung wrote: > I have a perl program about update file from pc to mysql,but I want to > limit filesize,how to obtain filesize and file type? > for the file size you can use File::stat use strict; use warnings; use File::stat; my $file = "C:\\temp\\size.txt"; if ( -e "$file" ) { my $stat = stat($file); my $size = stat($file)->size; print "Size of $file is: " . $size . "\n"; } else { print "Could not fine $file\n" && die "\n"; } for the file type you could query the extension by using a regex. Don't know what you want to do with the file type, but if you want to exclude a certain type of files you could do something like next if ( ( $file =~ /^.*\.exe$/i ) || ( $file =~ /^.*\.zip$/i ) ); Just a best guess. Alex ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs