[28104] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 9468 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 14 03:05:47 2006

Date: Fri, 14 Jul 2006 00:05:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 14 Jul 2006     Volume: 10 Number: 9468

Today's topics:
        Free to wrong pool 2227b8 not 3d5a2aa0 at C:/Perl/lib/X rob.chuah@gmail.com
    Re: Free to wrong pool 2227b8 not 3d5a2aa0 at C:/Perl/l <rob.chuah@gmail.com>
        new CPAN modules on Fri Jul 14 2006 (Randal Schwartz)
        pass a variable to a system call ? <jack_posemsky@yahoo.com>
    Re: pass a variable to a system call ? <jurgenex@hotmail.com>
    Re: pass a variable to a system call ? <DJStunks@gmail.com>
    Re: pass a variable to a system call ? <someone@example.com>
        Perl based free bulletin board system <ignoramus14396@NOSPAM.14396.invalid>
    Re: problem with time stamp davide.papagno@gmail.com
    Re: some help again with if statement <mumia.w.18.spam+nospam.usenet@earthlink.net>
    Re: What is a type error? <marshall.spight@gmail.com>
    Re: What is a type error? <cdsmith@twu.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 13 Jul 2006 23:45:42 -0700
From: rob.chuah@gmail.com
Subject: Free to wrong pool 2227b8 not 3d5a2aa0 at C:/Perl/lib/XSLoader.pm line -1.
Message-Id: <1152859541.961592.81760@s13g2000cwa.googlegroups.com>

I have posted actually on the perl.ithread forum but found out later it
is a low activity forum. So I am trying out my luck here again and
hopefully wont be taken as spamming.

I was trying to run some code usign Parallel:ForkManager but come to
the error message "Free to wrong pool 2227b8 not 3d5a2aa0 at
C:/Perl/lib/XSLoader.pm line -1."

Not sure if anyone see this before and have this fixed ?
I am running Perl v5.8.8 built for MSWin32-x86-multi-thread on WinXP
SP2

below are the code snippet

  use LWP::Simple;
  use Parallel::ForkManager;

  ...

  @links=(
    ["http://www.foo.bar/rulez.data","rulez_data.txt"],
    ["http://new.host/more_data.doc","more_data.doc"],
    ...
  );

  ...

  # Max 30 processes for parallel download
  my $pm = new Parallel::ForkManager(30);

  foreach my $linkarray (@links) {
    $pm->start and next; # do the fork

    my ($link,$fn) = @$linkarray;
    warn "Cannot get $fn from $link"
      if getstore($link,$fn) != RC_OK;

    $pm->finish; # do the exit in the child process
  }
  $pm->wait_all_children;



------------------------------

Date: 13 Jul 2006 23:59:59 -0700
From: "greenrob" <rob.chuah@gmail.com>
Subject: Re: Free to wrong pool 2227b8 not 3d5a2aa0 at C:/Perl/lib/XSLoader.pm line -1.
Message-Id: <1152860399.714115.110000@m73g2000cwd.googlegroups.com>

I am now seeing another type of error message

Free to wrong pool 2227b8 not 3857a5f8 at C:/Perl/lib/IO/Socket.pm line
11

Also, the PF usage keep rising as the program loops and crashed after
300+ loops.

Has any one experience something like this before ?

Thanks

rob.chuah@gmail.com wrote:
> I have posted actually on the perl.ithread forum but found out later it
> is a low activity forum. So I am trying out my luck here again and
> hopefully wont be taken as spamming.
>
> I was trying to run some code usign Parallel:ForkManager but come to
> the error message "Free to wrong pool 2227b8 not 3d5a2aa0 at
> C:/Perl/lib/XSLoader.pm line -1."
>
> Not sure if anyone see this before and have this fixed ?
> I am running Perl v5.8.8 built for MSWin32-x86-multi-thread on WinXP
> SP2
>
> below are the code snippet
>
>   use LWP::Simple;
>   use Parallel::ForkManager;
>
>   ...
>
>   @links=(
>     ["http://www.foo.bar/rulez.data","rulez_data.txt"],
>     ["http://new.host/more_data.doc","more_data.doc"],
>     ...
>   );
>
>   ...
>
>   # Max 30 processes for parallel download
>   my $pm = new Parallel::ForkManager(30);
>
>   foreach my $linkarray (@links) {
>     $pm->start and next; # do the fork
>
>     my ($link,$fn) = @$linkarray;
>     warn "Cannot get $fn from $link"
>       if getstore($link,$fn) != RC_OK;
>
>     $pm->finish; # do the exit in the child process
>   }
>   $pm->wait_all_children;



------------------------------

Date: Fri, 14 Jul 2006 04:42:29 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Fri Jul 14 2006
Message-Id: <J2DMEt.vLr@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

ANSIColor-1.11
http://search.cpan.org/~rra/ANSIColor-1.11/
Color screen output using ANSI escape sequences
----
Amce-CNA-0.01
http://search.cpan.org/~rjbs/Amce-CNA-0.01/
a moer tolernat verison of mehtod location
----
Amce-CNA-0.02
http://search.cpan.org/~rjbs/Amce-CNA-0.02/
a moer tolernat verison of mehtod location
----
Amce-CNA-0.03
http://search.cpan.org/~rjbs/Amce-CNA-0.03/
a moer tolernat verison of mehtod location
----
Amce-CNA-0.04
http://search.cpan.org/~rjbs/Amce-CNA-0.04/
a moer tolernat verison of mehtod location
----
Amce-CNA-0.05
http://search.cpan.org/~rjbs/Amce-CNA-0.05/
a moer tolernat verison of mehtod location
----
Apache-SizeLimit-0.9
http://search.cpan.org/~drolsky/Apache-SizeLimit-0.9/
Because size does matter.
----
Astro-SpaceTrack-0.021
http://search.cpan.org/~wyant/Astro-SpaceTrack-0.021/
----
Biblio-Isis-0.22
http://search.cpan.org/~dpavlin/Biblio-Isis-0.22/
Read CDS/ISIS, WinISIS and IsisMarc database
----
Bot-BasicBot-Pluggable-Module-RD-0.02
http://search.cpan.org/~ivorw/Bot-BasicBot-Pluggable-Module-RD-0.02/
RecDescent grammar adaptor plugin
----
Business-DE-KontoCheck-0.09
http://search.cpan.org/~tinita/Business-DE-KontoCheck-0.09/
Validating Bank-Account Numbers for Germany
----
CAM-PDF-1.07
http://search.cpan.org/~clotho/CAM-PDF-1.07/
PDF manipulation library
----
CGI-Builder-GetPageName-0.03
http://search.cpan.org/~tomyhero/CGI-Builder-GetPageName-0.03/
GetPageName from path info.
----
CGI-Builder-PathInfoMagic-0.03
http://search.cpan.org/~tomyhero/CGI-Builder-PathInfoMagic-0.03/
Deprecated. Use CGI::Builder::GetPageName instead.
----
Catalyst-Model-Proxy-0.03
http://search.cpan.org/~alexp/Catalyst-Model-Proxy-0.03/
Proxy Model Class
----
Catalyst-Plugin-StackTrace-0.05
http://search.cpan.org/~jguenther/Catalyst-Plugin-StackTrace-0.05/
Display a stack trace on the debug screen
----
Clone-More-0.90.1
http://search.cpan.org/~wazzuteke/Clone-More-0.90.1/
Perl module for natively copying Perl data structures
----
DBIx-Class-0.06999_06
http://search.cpan.org/~mstrout/DBIx-Class-0.06999_06/
Extensible and flexible object <-> relational mapper.
----
DBIx-Class-0.06999_07
http://search.cpan.org/~dkamholz/DBIx-Class-0.06999_07/
Extensible and flexible object <-> relational mapper.
----
DBIx-Log4perl-0.06
http://search.cpan.org/~mjevans/DBIx-Log4perl-0.06/
Perl extension for DBI to selectively log SQL, parameters, result-sets, transactions etc to a Log::Log4perl handle.
----
Data-Alias-1.0
http://search.cpan.org/~xmath/Data-Alias-1.0/
Comprehensive set of aliasing operations
----
Data-LazyACL-0.01
http://search.cpan.org/~tomyhero/Data-LazyACL-0.01/
Simple and Easy Access Control List
----
EekBoek-0.63
http://search.cpan.org/~jv/EekBoek-0.63/
Bookkeeping software for small and medium-size businesses
----
Email-MIME-1.85
http://search.cpan.org/~rjbs/Email-MIME-1.85/
Easy MIME message parsing.
----
Email-MIME-Creator-1.45
http://search.cpan.org/~rjbs/Email-MIME-Creator-1.45/
Email::MIME constructor for starting anew.
----
Email-MIME-Modifier-1.43
http://search.cpan.org/~rjbs/Email-MIME-Modifier-1.43/
Modify Email::MIME Objects Easily
----
Email-Stuff-2.03
http://search.cpan.org/~adamk/Email-Stuff-2.03/
A more casual approach to creating and sending Email:: emails
----
Email-Thread-0.70
http://search.cpan.org/~rjbs/Email-Thread-0.70/
Use JWZ's mail threading algorithm with Email::Simple objects
----
Error-0.17
http://search.cpan.org/~shlomif/Error-0.17/
Error/exception handling in an OO-ish way
----
File-HomeDir-0.60_02
http://search.cpan.org/~adamk/File-HomeDir-0.60_02/
Get the home directory for yourself or other users
----
File-RsyncP-0.62
http://search.cpan.org/~cbarratt/File-RsyncP-0.62/
Perl Rsync client
----
Geo-SpaceManager-0.9
http://search.cpan.org/~jgibson/Geo-SpaceManager-0.9/
Place rectangles without overlap
----
Graph-0.77
http://search.cpan.org/~jhi/Graph-0.77/
graph data structures and algorithms
----
HTML-Latemp-GenMakeHelpers-0.1.7
http://search.cpan.org/~shlomif/HTML-Latemp-GenMakeHelpers-0.1.7/
A Latemp Utility Module.
----
HTML-Prototype-1.47
http://search.cpan.org/~esskar/HTML-Prototype-1.47/
Generate HTML and Javascript for the Prototype library
----
HTML-Template-Compiled-0.71
http://search.cpan.org/~tinita/HTML-Template-Compiled-0.71/
Template System Compiles HTML::Template files to Perl code
----
IPC-Mmap-SimpleShare-0.03
http://search.cpan.org/~aduitsis/IPC-Mmap-SimpleShare-0.03/
Safely share structures among processes using anonymous mmap.
----
InSilicoSpectro-0.9.24
http://search.cpan.org/~alexmass/InSilicoSpectro-0.9.24/
Open source Perl library for proteomics
----
Lemonldap-NG-Handler-0.06
http://search.cpan.org/~guimard/Lemonldap-NG-Handler-0.06/
Perl extension for building a Lemonldap compatible handler
----
Log-Dispatch-Email-EmailSend-0.02
http://search.cpan.org/~drolsky/Log-Dispatch-Email-EmailSend-0.02/
Subclass of Log::Dispatch::Email that uses Email::Send
----
MMS-Mail-Message-0.06
http://search.cpan.org/~robl/MMS-Mail-Message-0.06/
A class representing an MMS (or picture) message sent via email.
----
MMS-Mail-Parser-0.12
http://search.cpan.org/~robl/MMS-Mail-Parser-0.12/
A class for parsing MMS (or picture) messages via email.
----
MMS-Mail-Parser-0.13
http://search.cpan.org/~robl/MMS-Mail-Parser-0.13/
A class for parsing MMS (or picture) messages via email.
----
MMS-Mail-Provider-0.07
http://search.cpan.org/~robl/MMS-Mail-Provider-0.07/
This provides a base class for parsing an MMS::Mail::Message object into a MMS::Mail::Message::Parsed object.
----
MMS-Mail-Provider-UK02-0.08
http://search.cpan.org/~robl/MMS-Mail-Provider-UK02-0.08/
This provides a class for parsing an MMS::Mail::Message object that has been sent via the UK 02 network.
----
MMS-Mail-Provider-UK3-0.02
http://search.cpan.org/~robl/MMS-Mail-Provider-UK3-0.02/
This provides a class for parsing an MMS::Mail::Message object that has been sent via the UK 3 network.
----
MMS-Mail-Provider-UKOrange-0.06
http://search.cpan.org/~robl/MMS-Mail-Provider-UKOrange-0.06/
This provides a class for parsing an MMS::Mail::Message object that has been sent via the UK Orange network.
----
MMS-Mail-Provider-UKTMobile-0.04
http://search.cpan.org/~robl/MMS-Mail-Provider-UKTMobile-0.04/
This provides a class for parsing an MMS::Mail::Message object that has been sent via the UK T-Mobile network.
----
MMS-Mail-Provider-UKVirgin-0.05
http://search.cpan.org/~robl/MMS-Mail-Provider-UKVirgin-0.05/
This provides a class for parsing an MMS::Mail::Message object that has been sent via the UK Virgin network.
----
MMS-Mail-Provider-UKVodafone-0.07
http://search.cpan.org/~robl/MMS-Mail-Provider-UKVodafone-0.07/
This provides a class for parsing an MMS::Mail::Message object that has been sent via the UK Vodafone network.
----
Module-Dependency-1.85
http://search.cpan.org/~timb/Module-Dependency-1.85/
Collection of modules for examining dependencies between parents and children, like Perl files
----
Module-Dependency-1.86
http://search.cpan.org/~timb/Module-Dependency-1.86/
Collection of modules for examining dependencies between parents and children, like Perl files
----
Moose-0.11
http://search.cpan.org/~stevan/Moose-0.11/
A complete modern object system for Perl 5
----
Net-DHCP-0.66
http://search.cpan.org/~shadinger/Net-DHCP-0.66/
----
POE-Component-Client-HTTP-0.77
http://search.cpan.org/~rcaputo/POE-Component-Client-HTTP-0.77/
a HTTP user-agent component
----
POE-Component-Client-Whois-1.05
http://search.cpan.org/~bingos/POE-Component-Client-Whois-1.05/
A one shot non-blocking RFC 812 WHOIS query.
----
POE-Component-Server-Ident-1.04
http://search.cpan.org/~bingos/POE-Component-Server-Ident-1.04/
A component that provides non-blocking ident services to your sessions.
----
Pod-Xhtml-1.52
http://search.cpan.org/~bbc/Pod-Xhtml-1.52/
Generate well-formed XHTML documents from POD format documentation
----
REST-Application-0.94
http://search.cpan.org/~moconnor/REST-Application-0.94/
A framework for building RESTful web-applications.
----
REST-Application-0.95
http://search.cpan.org/~moconnor/REST-Application-0.95/
A framework for building RESTful web-applications.
----
RT-Client-REST-0.06
http://search.cpan.org/~dmitri/RT-Client-REST-0.06/
talk to RT installation using REST protocol.
----
Regexp-Assemble-0.26
http://search.cpan.org/~dland/Regexp-Assemble-0.26/
Assemble multiple Regular Expressions into a single RE
----
RiveScript-1.02
http://search.cpan.org/~kirsle/RiveScript-1.02/
Rendering Intelligence Very Easily
----
SQLite-VirtualTable-0.01
http://search.cpan.org/~salva/SQLite-VirtualTable-0.01/
Create SQLite Virtual Table extensions in Perl.
----
SQLite-VirtualTable-0.02
http://search.cpan.org/~salva/SQLite-VirtualTable-0.02/
Create SQLite Virtual Table extensions in Perl.
----
SQLite-VirtualTable-0.03
http://search.cpan.org/~salva/SQLite-VirtualTable-0.03/
Create SQLite Virtual Table extensions in Perl.
----
SVG-DOM2-1.00
http://search.cpan.org/~doctormo/SVG-DOM2-1.00/
SVG extention to the popular XML::DOM2
----
SVN-Notify-Config-0.08
http://search.cpan.org/~jpeacock/SVN-Notify-Config-0.08/
Config-driven Subversion notification
----
SystemPerl-1.271
http://search.cpan.org/~wsnyder/SystemPerl-1.271/
SystemPerl Language Extension to SystemC
----
Term-Encoding-0.01
http://search.cpan.org/~miyagawa/Term-Encoding-0.01/
Detect encoding of the current terminal
----
Test-Chimps-0.02
http://search.cpan.org/~zev/Test-Chimps-0.02/
Collaborative Heterogeneous Infinite Monkey Perfectionification Service
----
Test-Chimps-Anna-0.02
http://search.cpan.org/~zev/Test-Chimps-Anna-0.02/
An IRQ bot that announces test failures (and unexpected passes)
----
Test-Chimps-Client-0.02
http://search.cpan.org/~zev/Test-Chimps-Client-0.02/
Send smoke test results to a server
----
Text-CSV-Separator-0.08
http://search.cpan.org/~enell/Text-CSV-Separator-0.08/
Determine the field separator of a CSV file
----
Text-CSV-Separator-0.09
http://search.cpan.org/~enell/Text-CSV-Separator-0.09/
Determine the field separator of a CSV file
----
Text-MeCab-0.10
http://search.cpan.org/~dmaki/Text-MeCab-0.10/
Alternate Interface To libmecab
----
Text-MeCab-0.11
http://search.cpan.org/~dmaki/Text-MeCab-0.11/
Alternate Interface To libmecab
----
Text-Restructured-0.003016
http://search.cpan.org/~nodine/Text-Restructured-0.003016/
----
Thread-Suspend-1.02
http://search.cpan.org/~jdhedden/Thread-Suspend-1.02/
Suspend and resume operations for threads
----
Thread-Suspend-1.03
http://search.cpan.org/~jdhedden/Thread-Suspend-1.03/
Suspend and resume operations for threads
----
WWW-Search-MSN-0.0102
http://search.cpan.org/~shlomif/WWW-Search-MSN-0.0102/
backend for searching search.msn.com
----
Win32-API-Interface-0.0001_03
http://search.cpan.org/~esskar/Win32-API-Interface-0.0001_03/
Object oriented interface generation
----
Win32-API-Interface-0.0001_04
http://search.cpan.org/~esskar/Win32-API-Interface-0.0001_04/
Object oriented interface generation
----
Win32-API-Interface-0.0001_05
http://search.cpan.org/~esskar/Win32-API-Interface-0.0001_05/
Object oriented interface generation
----
Win32-Security-EFS-0.09
http://search.cpan.org/~esskar/Win32-Security-EFS-0.09/
Perl interface to functions that assist in working with EFS (Encrypted File System) under Windows plattforms.
----
XML-Atom-0.21
http://search.cpan.org/~miyagawa/XML-Atom-0.21/
Atom feed and API implementation
----
XML-DOM2-0.03
http://search.cpan.org/~doctormo/XML-DOM2-0.03/
DOM controlled, strict XML module for extentable xml objects.
----
YAML-Syck-0.62
http://search.cpan.org/~audreyt/YAML-Syck-0.62/
Fast, lightweight YAML loader and dumper
----
cshmen-3.50
http://search.cpan.org/~hmbrand/cshmen-3.50/
----
v6-alpha-0.007
http://search.cpan.org/~fglock/v6-alpha-0.007/


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: 13 Jul 2006 20:30:41 -0700
From: "Jack" <jack_posemsky@yahoo.com>
Subject: pass a variable to a system call ?
Message-Id: <1152847841.298519.205040@35g2000cwc.googlegroups.com>

Ok this is annoying.. I tried the code below tons of different ways,
even with double quotes " " with no luck.. how do I pass a variable
into a system call ??!!

$filename = 'FileList.txt';
system("dir /B c:\test_files > c:\test_files\".$filename);

 ..   OR   ...

$filename = 'FileList.txt';
system('dir /B c:\test_files > c:\test_files\'.$filename);

Any ideas ??

Thank you,
Jack



------------------------------

Date: Fri, 14 Jul 2006 03:52:13 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: pass a variable to a system call ?
Message-Id: <NxEtg.6519$Th7.2899@trnddc05>

Jack wrote:
> Ok this is annoying.. I tried the code below tons of different ways,
> even with double quotes " " with no luck.. how do I pass a variable
> into a system call ??!!
>
> $filename = 'FileList.txt';
> system("dir /B c:\test_files > c:\test_files\".$filename);

For example exactly that way.
However, are you certain that the first character of your folder name is a 
TAB character?
And the escaped closing double quote yields a
    Can't find string terminator '"' anywhere before EOF at t.pl
when I try it.

> ..   OR   ...
>
> $filename = 'FileList.txt';
> system('dir /B c:\test_files > c:\test_files\'.$filename);

Same error here. Why do you escape the closing single quote?

> Any ideas ??

Yep. Use normal forward slashes to avoid the leaning toothpick syndrome.

jue 




------------------------------

Date: 13 Jul 2006 20:56:05 -0700
From: "DJ Stunks" <DJStunks@gmail.com>
Subject: Re: pass a variable to a system call ?
Message-Id: <1152849364.990440.56880@75g2000cwc.googlegroups.com>


Jack wrote:
> Ok this is annoying.. I tried the code below tons of different ways,
> even with double quotes " " with no luck.. how do I pass a variable
> into a system call ??!!
>
> $filename = 'FileList.txt';
> system("dir /B c:\test_files > c:\test_files\".$filename);
>
> ..   OR   ...
>
> $filename = 'FileList.txt';
> system('dir /B c:\test_files > c:\test_files\'.$filename);
>
> Any ideas ??

yes, I have some ideas.

first idea:  have you looked at perldoc -f system and, for good
measure, perldoc -f exec?

second idea:  do you understand how interpolation works in a double
quoted string?  particularly with regard to backslashes?

third (and final) idea:  did you know Perl isn't a glorified shell
scripting language or batch file replacement?  if you want a directory
listing as part of another, more complicated script, usually the best
idea is using a Perl module to grab the information rather than
shelling out to dir.  

HTH,
-jp



------------------------------

Date: Fri, 14 Jul 2006 06:08:52 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: pass a variable to a system call ?
Message-Id: <UxGtg.105529$I61.90693@clgrps13>

Jack wrote:
> Ok this is annoying.. I tried the code below tons of different ways,
> even with double quotes " " with no luck.. how do I pass a variable
> into a system call ??!!
> 
> $filename = 'FileList.txt';
> system("dir /B c:\test_files > c:\test_files\".$filename);
> 
> ..   OR   ...
> 
> $filename = 'FileList.txt';
> system('dir /B c:\test_files > c:\test_files\'.$filename);
> 
> Any ideas ??

It looks like you need something like:

my $filename = 'FileList.txt';
my $dir      = 'c:/test_files';

open my $fh, '>', "$dir/$filename" or die "Cannot open '$dir/$filename' $!";

opendir my $dh, $dir or die "Cannot open '$dir' $!";

print $fh map "$_\n", readdir $dh;

closedir $dh;
close $fh;



John
-- 
use Perl;
program
fulfillment


------------------------------

Date: Fri, 14 Jul 2006 01:30:51 GMT
From: Ignoramus14396 <ignoramus14396@NOSPAM.14396.invalid>
Subject: Perl based free bulletin board system
Message-Id: <ftCtg.2457$CI2.745@fe38.usenetserver.com>

I am looking for perl based bulletin board system, with good safety
and security track record. Perl/Apache/MySQL or filesystem
storage. Any suggestions will be appreciated.

i



------------------------------

Date: 13 Jul 2006 23:49:46 -0700
From: davide.papagno@gmail.com
Subject: Re: problem with time stamp
Message-Id: <1152859786.479023.52310@m79g2000cwm.googlegroups.com>

GREAT!!!
Thanx all!!


John W. Krahn ha scritto:

> davide.papagno@gmail.com wrote:
> >
> > I use this command to get the time stamp file output
> >
> > $date = ctime(stat($file)->mtime);
>
> According to my ctime(3) man page: "The call ctime(t) is equivalent to
> asctime(localtime(t))." and in perl localtime() in scalar context is the same
> as C's asctime(localtime(t)) so you don't really need ctime there:
>
> $date = localtime stat( $file )->mtime;
>
>
> > and what I get is:
> >
> > Wed Apr  5 16:44:43 2006
> >
> > is there a simple way to get only
> >
> > Wed Apr  5
>
> $date = substr localtime stat( $file )->mtime, 0, 10;
> 
> 
> 
> John
> -- 
> use Perl;
> program
> fulfillment



------------------------------

Date: Fri, 14 Jul 2006 06:32:32 GMT
From: "Mumia W." <mumia.w.18.spam+nospam.usenet@earthlink.net>
Subject: Re: some help again with if statement
Message-Id: <4UGtg.7410$ye3.1014@newsread1.news.pas.earthlink.net>

On 07/13/2006 05:36 PM, starfrit wrote:
> [...]
> # Team section
> # <H1>Rangers at Vancouver</H1>
> if (m/<h1>\s*(\w*.*) vs \s*(\w*.*)/)

"at" vs. "vs."

> [...]


------------------------------

Date: 13 Jul 2006 18:54:47 -0700
From: "Marshall" <marshall.spight@gmail.com>
Subject: Re: What is a type error?
Message-Id: <1152842087.797288.132490@75g2000cwc.googlegroups.com>

Chris Smith wrote:
> Marshall <marshall.spight@gmail.com> wrote:
> > Chris Smith wrote:
> > > Darren New <dnew@san.rr.com> wrote:
> > > > Chris Smith wrote:
> > > > > Unless I'm missing your point, I disagree with your disagreement.
> > > > > Mutability only makes sense because of object identity (in the generic
> > > > > sense; no OO going on here).
> > > >
> > > > Depends what you mean by "object".
> > > >
> > > > int x = 6; int y = 5; x = y;
> > > >
> > > > I'd say x was mutable, with no "identity" problems involved?
> > >
> > > The variable x definitely has identity that's independent of its value.
> >
> > I'm not sure what you mean by that.
>
> I mean, simply, that when you can assign a value to a variable, then you
> care that it is that variable and not a different one.  That's identity
> in the normal sense of the word.

I guess it is, now that you mention it.


> The code elsewhere in the procedure is
> able to access the value of 'x', and that has meaning even though you
> don't know what value 'x' has.  This has definite implications, and is a
> useful concept; for example, it means that the pure lambda calculus no
> longer sufficient to express the semantics of the programming language,
> but instead something else is required.
>
> What you are asking for is some subset of identity, and I've not yet
> succeeded in understanding exactly what it is or what its limits are...
> except that so far, it seems to have everything to do with pointers or
> aliasing.

Perhaps it is specifically first-class identity, rather than identity
per se.


> > >  I also see, though, that the majority (so far, I'd
> > > say all) of the potential uses for which it's worth introducing mutation
> > > into an otherwise mutation-free language allow the possibility of
> > > aliasing, which sorta makes me wonder whether this problem is worth
> > > solving.
> >
> > What about my example of SQL? Mutation, no pointers, no aliasing.
> > Yet: useful.
>
> I'm not yet convinced that this is any different from a language with
> standard pointer aliasing.  If I have two tables A and B, and a foreign
> key from A into B, then I run into the same problems with enforcing
> constraints that I would see with a pointer model... when I update a
> relation, I need to potentially check every other relation that contains
> a foreign key into it, in order to ensure that its constraints are not
> violated by that constraint.  That's the same thing that is being
> pointed out as a negative consequence of aliasing in other languages.

No, that's not the same thing. What you are describing here is
not an aliasing issue, but simply the consequences of allowing
constraints to mention more than one variable.

In our i-and-j example above, suppose there was a constraint
such that i < j. We have to re-check this constraint if we
update either i or j. That's not the same thing as saying
that i and j are aliased.

A foreign key constraint is a multi-variable constraint.
Specifically, a foreign key from table A, attribute a
to table B, attribute b is the constraint:

forall a in A, exists b in B such that a = b.

Note that two variables, A and B, are referenced in
the constraint. In general, any constraint on two
variables will have to be rechecked upon update
to either.


> For example, executing:
>
>     UPDATE P SET x = 5 WHERE y = 43;
>
> may result in the database having to re-evaluate the constraint that
> says that for all P(x, y, z), x must be less than 4 when z = 17.

I don't see any aliasing in this example either.

But consider how much worse this problem is if real aliasing
is possible. We have some pointer variable, and initialize
it with the return value from some function. We don't know
anything about what variable is involved. We update through
the pointer. What constraints must we recheck? Apparently
all of them; unless we have perfect alias analysis, we can't
tell what variables are affected by our update.


> One
> difference is that while in general purpose programming languages this
> appears to be a daunting task, databases are set up to do these kinds of
> things all the time and contain optimizations for it... but the problem
> is still the same, and it would still present the same difficulties in
> doing formal proofs that running the above UPDATE statement doesn't
> violate any invariants.
>
> (If I'm wrong about that, please let me know; I'd very interested if
> that's so.)

I'm interested to hear your reply.


Marshall



------------------------------

Date: Thu, 13 Jul 2006 20:36:51 -0600
From: Chris Smith <cdsmith@twu.net>
Subject: Re: What is a type error?
Message-Id: <MPG.1f20b12c658f511098979c@news.altopia.net>

Marshall <marshall.spight@gmail.com> wrote:
> > What you are asking for is some subset of identity, and I've not yet
> > succeeded in understanding exactly what it is or what its limits are...
> > except that so far, it seems to have everything to do with pointers or
> > aliasing.
> 
> Perhaps it is specifically first-class identity, rather than identity
> per se.

As in: "the value of one variable can (be/refer to/depend on) the 
identity of another variable"?  I can certainly see this as as 
reasonable concept to consider.

> > I'm not yet convinced that this is any different from a language with
> > standard pointer aliasing.  If I have two tables A and B, and a foreign
> > key from A into B, then I run into the same problems with enforcing
> > constraints that I would see with a pointer model... when I update a
> > relation, I need to potentially check every other relation that contains
> > a foreign key into it, in order to ensure that its constraints are not
> > violated by that constraint.  That's the same thing that is being
> > pointed out as a negative consequence of aliasing in other languages.
> 
> No, that's not the same thing. What you are describing here is
> not an aliasing issue, but simply the consequences of allowing
> constraints to mention more than one variable.

> A foreign key constraint is a multi-variable constraint.
> Specifically, a foreign key from table A, attribute a
> to table B, attribute b is the constraint:
> 
> forall a in A, exists b in B such that a = b.
> 
> Note that two variables, A and B, are referenced in
> the constraint.

There's confusion here coming from different usages of the word 
variable.  Let us talk instead of values, and of the abstract structures 
that gives them meaning.  In both cases (invariants in a hypothetical 
imperative language, and in a relational database), the constraints make 
reference to these structures of values (relations, for example, or 
various kinds of data structures), and not to the individual values or 
objects that they contain.  In both cases, the problem is not that we 
don't know what structures to check to verify the invariant; rather, 
it's that we have to check ALL of the values in that structure.

As someone pointed out, this is to be expected in a world of mutable 
things with identity that are globally locatable.  It is simple fact 
that if I tell you "I spoke to Barbara's husband", you may need to trace 
down who Barbara's husband is before you could discover that, for 
example, maybe I actually spoke to your boss, or to your nephew's best-
friend's father.  If databases are capable of modeling these kinds of 
relationships (and of course they are), then they are as susceptible to 
"aliasing" -- in a logical sense that avoids mention of pointer -- as 
anyone else.

> I don't see any aliasing in this example either.
> 

Actually, this was probably a bad example.  Let's stick to the others 
involving relationships between tuples.

-- 
Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 9468
***************************************


home help back first fref pref prev next nref lref last post