perl.macperl.anyperl http://www.nntp.perl.org/group/perl.macperl.anyperl/ ... Copyright 1998-2014 perl.org Thu, 28 Aug 2014 03:57:38 +0000 ask@perl.org Re: [MacPerl-AnyPerl] DBI under the MAC by Sean Murphy Hi Keary <br/><br/>Ouch, it was right in front of my nose and I didn&#39;t see it.<br/><br/>Thanks.<br/>On 10/12/2011, at 2:53 AM, Keary Suska wrote:<br/><br/>&gt; On Dec 9, 2011, at 4:42 AM, Sean Murphy wrote:<br/>&gt; <br/>&gt;&gt; my $sth2 = $dbh-&gt;prepare(&quot;insert into trans (accounts, transaction_date, description, amount, amount_type, transaction_type, serial, category_id) values (?, ?, ?, ?, ?, ?, ?, ?);&quot;)<br/>&gt;&gt; or die(&quot;Cannot prepare: &quot; . DBI::errstr() );<br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; When the above is executed in the full script. We get the following error:<br/>&gt;&gt; <br/>&gt;&gt; DBD::SQLite::db prepare failed: table trans has no column named accounts at ./insert_budget.pl line 60.<br/>&gt;&gt; Cannot prepare: table trans has no column named accounts at ./insert_budget.pl line 60.<br/>&gt; <br/>&gt; &quot;accounts&quot; (plural)<br/>&gt; <br/>&gt;&gt; sqlite&gt; .schema trans<br/>&gt;&gt; CREATE TABLE trans (transaction_id int primary key, account int, transaction_date date, description varchar(80), amount decimal (11,2), amount_type varchar(3) not null, transaction_type varchar(40), serial varchar(40), category_id int);<br/>&gt; <br/>&gt; &quot;account&quot; (singular)<br/>&gt; <br/>&gt; HTH,<br/>&gt; <br/>&gt; Keary Suska<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2011/12/msg306.html Fri, 09 Dec 2011 10:18:28 +0000 Re: [MacPerl-AnyPerl] Re: macperl-anyperl Digest 9 Dec 2011 11:43:02 -0000 Issue 112 by Sean Murphy Hi Joel<br/><br/><br/>Thanks for the heads up. The description of the list didn&#39;t indicate it was for the PowerPC version of Perl.<br/><br/>I will move to the other list you indicated.<br/><br/>Cheers<br/>Sean <br/>On 09/12/2011, at 11:26 PM, Joel Rees wrote:<br/><br/>&gt; Joel<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2011/12/msg305.html Fri, 09 Dec 2011 10:13:17 +0000 Re: [MacPerl-AnyPerl] DBI under the MAC by Keary Suska On Dec 9, 2011, at 4:42 AM, Sean Murphy wrote:<br/><br/>&gt; my $sth2 = $dbh-&gt;prepare(&quot;insert into trans (accounts, transaction_date, description, amount, amount_type, transaction_type, serial, category_id) values (?, ?, ?, ?, ?, ?, ?, ?);&quot;)<br/>&gt; or die(&quot;Cannot prepare: &quot; . DBI::errstr() );<br/>&gt; <br/>&gt; <br/>&gt; When the above is executed in the full script. We get the following error:<br/>&gt; <br/>&gt; DBD::SQLite::db prepare failed: table trans has no column named accounts at ./insert_budget.pl line 60.<br/>&gt; Cannot prepare: table trans has no column named accounts at ./insert_budget.pl line 60.<br/><br/>&quot;accounts&quot; (plural)<br/><br/>&gt; sqlite&gt; .schema trans<br/>&gt; CREATE TABLE trans (transaction_id int primary key, account int, transaction_date date, description varchar(80), amount decimal (11,2), amount_type varchar(3) not null, transaction_type varchar(40), serial varchar(40), category_id int);<br/><br/>&quot;account&quot; (singular)<br/><br/>HTH,<br/><br/>Keary Suska<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2011/12/msg304.html Fri, 09 Dec 2011 07:53:19 +0000 Re: macperl-anyperl Digest 9 Dec 2011 11:43:02 -0000 Issue 112 by Joel Rees &gt;<br/>&gt; From: Sean Murphy &lt;mhysnm1964@gmail.com&gt;<br/>&gt; Date: &#x5E73;&#x6210;23&#x5E74;12&#x6708;9&#x65E5; 20:42:49:JST<br/>&gt; To: macperl-anyperl@perl.org<br/>&gt; Subject: DBI under the MAC<br/>&gt;<br/>&gt;<br/>&gt; Hi All.<br/>&gt;<br/>&gt; I am having some strange behaviours. I have created a simple script <br/>&gt; to insert data into a SQLite database. When I use the prepare are<br/>&gt; statement. The DBI driver complains that there is no such table.<br/>&gt;<br/>&gt; The code looks like thus:<br/>&gt;<br/>&gt; #!/usr/bin/perl<br/>&gt;<br/>&gt; # Combining credit and savings sheets<br/>&gt; # to find expenses and income.<br/>&gt;<br/>&gt;<br/>&gt; use strict;<br/>&gt; use DBI;<br/>&gt;<br/>&gt; my $db_driver = &quot;SQLite&quot;;<br/>&gt; my $db_file = &quot;budget.db&quot;;<br/>&gt; my $dns = &quot;DBI:$db_driver:database=$db_file&quot;;<br/>&gt;<br/>&gt; my $dbh = DBI-&gt;connect ($dns, &#39;&#39;, &#39;&#39;,<br/>&gt; { RaiseError =&gt; 1, AutoCommit =&gt; 0});<br/>&gt;<br/>&gt; my $sth1 = $dbh-&gt;prepare(&quot;insert into cat (name) values (?);&quot;)<br/>&gt; or die(&quot;Cannot prepare table: &quot; . DBI::errstr() );<br/>&gt;<br/>&gt; my $sth2 = $dbh-&gt;prepare(&quot;insert into trans (accounts, <br/>&gt; transaction_date, description, amount, amount_type, <br/>&gt; transaction_type, serial, category_id) values <br/>&gt; (?, ?, ?, ?, ?, ?, ?, ?);&quot;)<br/>&gt; or die(&quot;Cannot prepare: &quot; . DBI::errstr() );<br/>&gt;<br/>&gt;<br/>&gt; When the above is executed in the full script. We get the following <br/>&gt; error:<br/>&gt;<br/>&gt; DBD::SQLite::db prepare failed: table trans has no column named <br/>&gt; accounts at ./insert_budget.pl line 60.<br/>&gt; Cannot prepare: table trans has no column named accounts at ./ <br/>&gt; insert_budget.pl line 60.<br/>&gt;<br/>&gt; The Schema for the table shows trans being present. As follows:<br/>&gt;<br/>&gt; sqlite&gt; .schema trans<br/>&gt; CREATE TABLE trans (transaction_id int primary key, account int, <br/>&gt; transaction_date date, description varchar(80), amount decimal <br/>&gt; (11,2), amount_type varchar(3) not null, transaction_type varchar <br/>&gt; (40), serial varchar(40), category_id int);<br/>&gt; sqlite&gt;<br/>&gt;<br/>&gt; Any ideas what might be going on here? The drivers are being found. <br/>&gt; I have tested this by using the perl -d option with the script.<br/>&gt;<br/>&gt; Sean<br/><br/> From the content of your question, I&#39;m guessing that you&#39;re working <br/>with Mac OS X and therefore non-MacPerl perl.<br/><br/>This list is for MacPerl, which is perl on the old pre-Mac OS X Mac <br/>systems.<br/><br/>The list you probably want is at macosx@perl.org .<br/><br/>I really shouldn&#39;t forward this to that list, but I will.<br/><br/>As far as your question is concerned, I&#39;m not familiar with SQLite, <br/>but it looks to me like your problem is not Mac OS X related. You <br/>might want to check your table definition again.<br/><br/>Joel Rees<br/>(waiting for a 3+GHz ARM processor to come out,<br/>to test Tim&#39;s willingness to switch again.)<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2011/12/msg303.html Fri, 09 Dec 2011 04:26:36 +0000 DBI under the MAC by Sean Murphy Hi All.<br/><br/>I am having some strange behaviours. I have created a simple script to insert data into a SQLite database. When I use the prepare are <br/>statement. The DBI driver complains that there is no such table. <br/><br/>The code looks like thus:<br/><br/>#!/usr/bin/perl<br/><br/># Combining credit and savings sheets<br/># to find expenses and income.<br/><br/><br/>use strict;<br/> use DBI;<br/> <br/>my $db_driver = &quot;SQLite&quot;;<br/>my $db_file = &quot;budget.db&quot;;<br/>my $dns = &quot;DBI:$db_driver:database=$db_file&quot;;<br/><br/>my $dbh = DBI-&gt;connect ($dns, &#39;&#39;, &#39;&#39;,<br/> { RaiseError =&gt; 1, AutoCommit =&gt; 0});<br/><br/>my $sth1 = $dbh-&gt;prepare(&quot;insert into cat (name) values (?);&quot;)<br/> or die(&quot;Cannot prepare table: &quot; . DBI::errstr() );<br/><br/>my $sth2 = $dbh-&gt;prepare(&quot;insert into trans (accounts, transaction_date, description, amount, amount_type, transaction_type, serial, category_id) values (?, ?, ?, ?, ?, ?, ?, ?);&quot;)<br/> or die(&quot;Cannot prepare: &quot; . DBI::errstr() );<br/><br/><br/>When the above is executed in the full script. We get the following error:<br/><br/>DBD::SQLite::db prepare failed: table trans has no column named accounts at ./insert_budget.pl line 60.<br/>Cannot prepare: table trans has no column named accounts at ./insert_budget.pl line 60.<br/><br/>The Schema for the table shows trans being present. As follows:<br/><br/>sqlite&gt; .schema trans<br/>CREATE TABLE trans (transaction_id int primary key, account int, transaction_date date, description varchar(80), amount decimal (11,2), amount_type varchar(3) not null, transaction_type varchar(40), serial varchar(40), category_id int);<br/>sqlite&gt; <br/><br/>Any ideas what might be going on here? The drivers are being found. I have tested this by using the perl -d option with the script.<br/><br/>Sean <br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2011/12/msg302.html Fri, 09 Dec 2011 03:43:01 +0000 Re: [MacPerl-AnyPerl] Let perl replase words by Jeff Lowrey $head =~ s/($replace)/&lt;u&gt;$1&lt;\/u&gt;/gi;<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2006/10/msg301.html Sat, 07 Oct 2006 15:29:20 +0000 Re: Let perl replase words by Chris Sarnowski <br/>On Oct 7, 2006, at 2:59 PM, Eelco Alosery wrote:<br/><br/>&gt;<br/>&gt; Hello,<br/>&gt;<br/>&gt; I have a small, (maby big) problem.<br/>&gt;<br/>&gt; Im writing a search script for my site, and wand to do some <br/>&gt; replacing of words.<br/>&gt;<br/>&gt; I have a string that contains for example this :<br/>&gt; Test this is a smal test script line.<br/>&gt;<br/>&gt; Now i have a search patern :<br/>&gt; test<br/>&gt;<br/>&gt; What i want to do is this.<br/>&gt; Test and test must be replased by &lt;b&gt;Test&lt;/b&gt; and &lt;b&gt;test&lt;/b&gt;<br/>&gt;<br/>&gt; Thus al (case insensative) matches to test must be converted to <br/>&gt; bold words.<br/>&gt;<br/>&gt; I have tested a lot, and the best result sovar is this code :<br/>&gt; $head =~ s/$replace/&lt;u&gt;$replace&lt;\/u&gt;/gi;<br/>&gt;<br/>&gt; But this code replases Test to &lt;b&gt;test&lt;/b&gt; it is realy convertet to <br/>&gt; the original search patern.<br/>&gt;<br/>&gt; Any help whit this is very welcome.<br/>&gt;<br/>&gt; Thanks,<br/>&gt; Eelco Alosery<br/><br/><br/>$head =~ s/($replace)/&lt;u&gt;$1&lt;\/u&gt;/gi;<br/><br/>This will match the value of $replace regardless of case. But $1 will <br/>preserve the case of the matched string, so will do what you want.<br/><br/>Just for fun, here is a program with a function that will replace any <br/>string with a different string and will match the case of each <br/>character of the original string in the corresponding position of the <br/>replacement string.<br/><br/>---- begin testcase.pl ----<br/>#!/usr/bin/perl -w<br/><br/>use strict;<br/>sub preserve_case($$) {<br/> my ($from, $to) = @_;<br/> my ($lf, $lt) = map length, @_;<br/> if ($lt &lt; $lf) {<br/> $from = substr $from, 0, $lt;<br/> } else {<br/> $from .= substr $to, $lf;<br/> }<br/> return uc $to | ($from ^ uc $from);<br/>}<br/><br/>### begin main<br/><br/>my $string = shift;<br/>my $orig = shift;<br/>my $replace = shift;<br/>$string =~ s/($orig)/preserve_case($1, $replace)/egi;<br/>print $string, &quot;\n&quot;;<br/><br/>---- end testcase.pl ----<br/><br/>% testcase.pl &quot;here is a foo string with a proper Foo and a FoO&quot; foo bar<br/>here is a bar string with a proper Bar and a BaR<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2006/10/msg300.html Sat, 07 Oct 2006 14:30:08 +0000 Let perl replase words by Eelco Alosery Hello,<br/><br/>I have a small, (maby big) problem.<br/><br/>Im writing a search script for my site, and wand to do some replacing <br/>of words.<br/><br/>I have a string that contains for example this :<br/>Test this is a smal test script line.<br/><br/>Now i have a search patern :<br/>test<br/><br/>What i want to do is this.<br/>Test and test must be replased by &lt;b&gt;Test&lt;/b&gt; and &lt;b&gt;test&lt;/b&gt;<br/><br/>Thus al (case insensative) matches to test must be converted to bold <br/>words.<br/><br/>I have tested a lot, and the best result sovar is this code :<br/>$head =~ s/$replace/&lt;u&gt;$replace&lt;\/u&gt;/gi;<br/><br/>But this code replases Test to &lt;b&gt;test&lt;/b&gt; it is realy convertet to <br/>the original search patern.<br/><br/>Any help whit this is very welcome.<br/><br/>Thanks,<br/>Eelco Alosery<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2006/10/msg299.html Sat, 07 Oct 2006 11:59:33 +0000 Install MacPerl on Freebsd by Joel Rees &gt; I am try to write a script that will rename Macintosh files to windows <br/>&gt; file<br/>&gt; name format. I do not have access to a Macintosh computer. Can <br/>&gt; MacPerl,<br/>&gt; Mac::Files, and Mac::MoreFiles run on a FreeBSD system?<br/><br/>If it&#39;s just a matter of naming, you don&#39;t need Mac::Files and the like.<br/><br/>But I would guess what you want to do is actually use the file type <br/>info that would be available in the Mac HFS file system to determine <br/>the file extensions? There used to be packages available for that sort <br/>of thing, but I&#39;m not sure if you can still find them. They never <br/>worked perfectly, as I recall. But it wouldn&#39;t be perl, it would be <br/>*nix. The utilities for installing netBSD or openBSD on the old Macs <br/>came with some utilities for moving only one fork into a BSD partition, <br/>but those are not scriptable by any means.<br/><br/>Hard to say what to suggest without more information. Old Macs with <br/>built-in ethernet and scsi are often really cheap on ebay, for <br/>instance. Likely to be easier to run the MacBSD on a Mac and have it <br/>ship things up the wire or save things onto a MS-DOS SCSI volume, or, <br/>if the files aren&#39;t big, onto an MS-DOS floppy.<br/><br/>--<br/>Joel Rees<br/> even though much of what I do is not sensible<br/> it does make sense if you know why ...<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2005/01/msg298.html Fri, 28 Jan 2005 08:21:00 +0000 Re: [MacPerl-AnyPerl] Install MacPerl on Freebsd by Bart Lateur On Thu, 27 Jan 2005 15:43:36 -0700, Aaron Siegel wrote:<br/><br/>&gt;I would like the ability to extract the creator and file type from the file so <br/>&gt;I can automate the renaming of Macintosh filenames to Windows filenames.<br/>&gt;MacPerl::GetFileInfo<br/><br/>If you have access to some Mac, you could convert the files to<br/>MacBinary, extension .bin. That makes it a flat file, and creator/file<br/>type are part of the header. There are some ancient, Mac Classic,<br/>conversion utilities floating around.<br/><br/>Or, you could go frisky and go take a peek to what&#39;s in the hidden<br/>&quot;.AppleDouble&quot; subfolder, if that&#39;s indeed what your file system uses.<br/><br/>-- <br/> Bart.<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2005/01/msg297.html Fri, 28 Jan 2005 01:01:34 +0000 Re: [MacPerl-AnyPerl] Install MacPerl on Freebsd by Chris Nandor At 15:43 -0700 2005.01.27, Aaron Siegel wrote:<br/>&gt;I would like the ability to extract the creator and file type from the file so<br/>&gt;I can automate the renaming of Macintosh filenames to Windows filenames.<br/>&gt;MacPerl::GetFileInfo<br/><br/>Once that file is on a non-Mac system, that information no longer exists,<br/>in most cases, as it is stored in a special metadata file on the system,<br/>and when you copy that file to a non-Mac system, it is left behind.<br/><br/>-- <br/>Chris Nandor pudge@pobox.com http://pudge.net/<br/>Open Source Technology Group pudge@ostg.com http://ostg.com/<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2005/01/msg296.html Thu, 27 Jan 2005 16:16:25 +0000 Re: [MacPerl-AnyPerl] Install MacPerl on Freebsd by Aaron Siegel <br/>I would like the ability to extract the creator and file type from the file so <br/>I can automate the renaming of Macintosh filenames to Windows filenames.<br/>MacPerl::GetFileInfo<br/><br/>On Thursday 27 January 2005 12:51, Chris Nandor wrote:<br/>&gt; At 12:46 -0700 2005.01.27, Aaron Siegel wrote:<br/>&gt; &gt;I am try to write a script that will rename Macintosh files to windows<br/>&gt; &gt; file name format. I do not have access to a Macintosh computer. Can<br/>&gt; &gt; MacPerl, Mac::Files, and Mac::MoreFiles run on a FreeBSD system?<br/>&gt;<br/>&gt; No, unless you count Mac OS X, which is largely based on FreeBSD.<br/>&gt;<br/>&gt; What functionality from those modules do you need?<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2005/01/msg295.html Thu, 27 Jan 2005 16:13:18 +0000 Re: [MacPerl-AnyPerl] Install MacPerl on Freebsd by Chris Nandor At 12:46 -0700 2005.01.27, Aaron Siegel wrote:<br/>&gt;I am try to write a script that will rename Macintosh files to windows file<br/>&gt;name format. I do not have access to a Macintosh computer. Can MacPerl,<br/>&gt;Mac::Files, and Mac::MoreFiles run on a FreeBSD system?<br/><br/>No, unless you count Mac OS X, which is largely based on FreeBSD.<br/><br/>What functionality from those modules do you need?<br/><br/>-- <br/>Chris Nandor pudge@pobox.com http://pudge.net/<br/>Open Source Technology Group pudge@ostg.com http://ostg.com/<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2005/01/msg294.html Thu, 27 Jan 2005 11:51:51 +0000 Install MacPerl on Freebsd by Aaron Siegel Hello<br/><br/>I am try to write a script that will rename Macintosh files to windows file <br/>name format. I do not have access to a Macintosh computer. Can MacPerl, <br/>Mac::Files, and Mac::MoreFiles run on a FreeBSD system?<br/><br/>Thank you<br/>Aaron<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2005/01/msg293.html Thu, 27 Jan 2005 10:43:35 +0000 Re: [MacPerl-AnyPerl] Filter a url by John Delacour At 1:48 pm +0100 31/10/04, Eelco Alosery wrote:<br/><br/>&gt;I want to filter a url from $ENV{&#39;HTTP_REFERER&#39;}<br/>&gt;If the url is http://www.testdomein.nl/test.html<br/>&gt;I only want a result testdomein.nl<br/>&gt;<br/>&gt;I have been testing whit this script<br/>&gt;$url =~ s/.*?\.(.+?)\/.*?/$1/is;<br/>&gt;<br/>&gt;It delets the first part of the url corect, but after .nl it deletes <br/>&gt;the slash and not the remaining tekst.<br/>&gt;The result is testdomein.nltest.html<br/>&gt;<br/>&gt;What is it i do wrong.<br/><br/><br/>Try something like this:<br/><br/>$_ =&quot;http://www.testdomain.nl/test.html&quot;;<br/><br/>s~ [^\.]+. ([^/]+) /.+ ~$1~x;<br/><br/>print &quot;$_$/&quot;;<br/><br/><br/>JD<br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/11/msg292.html Fri, 05 Nov 2004 09:57:57 +0000 Re: [MacPerl-AnyPerl] Filter a url by Ronald J Kimball On Sun, Oct 31, 2004 at 01:48:10PM +0100, Eelco Alosery wrote:<br/>&gt; Hello,<br/>&gt; <br/>&gt; I want to filter a url from $ENV{&#39;HTTP_REFERER&#39;}<br/>&gt; If the url is http://www.testdomein.nl/test.html<br/>&gt; I only want a result testdomein.nl<br/>&gt; <br/>&gt; I have been testing whit this script<br/>&gt; $url =~ s/.*?\.(.+?)\/.*?/$1/is;<br/>&gt; <br/>&gt; It delets the first part of the url corect, but after .nl it deletes <br/>&gt; the slash and not the remaining tekst.<br/>&gt; The result is testdomein.nltest.html<br/>&gt; <br/>&gt; What is it i do wrong.<br/><br/>.*? matches as few characters as possible. Since it&#39;s at the end of your<br/>regex, it never has to match anything.<br/><br/>This will work better:<br/><br/>$url =~ s,.*?\.(.+?)/.*,$1,is;<br/><br/>You may have to tweak it for URLs such as this:<br/><br/>http://testdomein.nl/test.html<br/><br/>Ronald<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/10/msg291.html Sun, 31 Oct 2004 16:46:16 +0000 Filter a url by Eelco Alosery Hello,<br/><br/>I want to filter a url from $ENV{&#39;HTTP_REFERER&#39;}<br/>If the url is http://www.testdomein.nl/test.html<br/>I only want a result testdomein.nl<br/><br/>I have been testing whit this script<br/>$url =~ s/.*?\.(.+?)\/.*?/$1/is;<br/><br/>It delets the first part of the url corect, but after .nl it deletes <br/>the slash and not the remaining tekst.<br/>The result is testdomein.nltest.html<br/><br/>What is it i do wrong.<br/><br/>Thanks,<br/>Eelco Alosery<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/10/msg290.html Sun, 31 Oct 2004 04:48:18 +0000 [MacPerl-AnyPerl] re: pestering diags by Louis Pouzin Thanks Ron,<br/><br/>Earlier, I had misinterpreted the warning and tested the value of the file handle variable, to no avail.<br/><br/>I would not have thought of the case you mentioned. Here is a test. Things happen just as you said.<br/><br/> 1. use strict; $\ = &quot;\n&quot;;<br/> 2. my ($fil,$lin) = &#39;peru&#39;;<br/> 3. open OUT,&quot;&gt;$fil&quot;;<br/> 4. {local $\; print OUT 0}; # only digit zero, no \n<br/> 5. close OUT;<br/> 6. open IN,$fil;<br/> 7. print &#39;1: &#39;,tell IN;<br/> 8. $lin = &lt;IN&gt; or print &quot;2: nil&quot;;<br/> 9. print &#39;3: &#39;,$lin;<br/>10. print &#39;4: &#39;,tell IN;<br/>11. open IN,$fil;<br/>12. defined($lin = &lt;IN&gt;) or print &quot;5: nil&quot;;<br/>13. print &#39;6: &#39;,defined $lin? $lin: &quot;undef&quot;;<br/>14. open IN,$fil;<br/>15. print 9,&lt;IN&gt;,9;<br/>16. __END__<br/><br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at ./bits.pl line 8.<br/>1: 0<br/>2: nil<br/>3: 0<br/>4: 1<br/>6: 0<br/>909<br/><br/>Best<br/>- -<br/>On Wed, 14 Apr 2004 12:43:17 -0400, Ronald J Kimball wrote:<br/><br/>&gt;What&#39;s wrong with the statements is exactly what the warnings are telling you!<br/><br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at qlib.pm line 25.<br/><br/>If the last line of a file is the single character 0 (not followed by a newline), then a boolean test will incorrectly suggest that no data was read from HANDLE. Thus, you should test with defined() instead.<br/><br/>You get these warnings even when that block of code is not executed because these are syntax warnings that are generated at compile time.<br/><br/>You probably want something like:<br/><br/>defined($var = &lt;HANDLE&gt;) or last;<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/04/msg289.html Fri, 16 Apr 2004 01:55:53 +0000 Re: [MacPerl-AnyPerl] pestering diags by Ronald J Kimball On Tue, Apr 13, 2004 at 10:54:55PM +0200, Louis Pouzin wrote:<br/><br/>&gt; I&#39;m puzzled. Why is gore interfering at all, and what&#39;s wrong with the<br/>&gt; squeaking statements ?<br/><br/>What&#39;s wrong with the statements is exactly what the warnings are telling<br/>you!<br/><br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at qlib.pm line 25.<br/><br/>If the last line of a file is the single character 0 (not followed by a<br/>newline), then a boolean test will incorrectly suggest that no data was<br/>read from HANDLE. Thus, you should test with defined() instead.<br/><br/>You get these warnings even when that block of code is not executed because<br/>these are syntax warnings that are generated at compile time.<br/><br/>You probably want something like:<br/><br/>defined($var = &lt;HANDLE&gt;) or last;<br/><br/>Ronald<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/04/msg288.html Wed, 14 Apr 2004 09:43:42 +0000 pestering diags by Louis Pouzin Hi,<br/><br/>Not sure this list is the right place for this problem.<br/>On unix I have been pestered for a while with a diag I can&#39;t figure out.Here is a test case:<br/><br/>### Main script &quot;tdiag.pl&quot; reads:<br/><br/>#!/usr/local/bin/perl -w<br/># test diag I/O<br/>use strict;<br/>$\ = &quot;\n&quot;; # print with \n<br/>print &quot;.. perl version: $]&quot;;<br/><br/>use plib qw(ofil);<br/>use qlib qw(msep glin);<br/><br/>$ARGV[0] = &#39;truc&#39;; # file truc contains some text<br/>local (*IN); # filehandle<br/>plib::ofil(*IN) || exit; # open file<br/>qlib::msep(*IN); # print 1st line<br/><br/>for (1..5) {local $\;<br/> print &quot;$_: &quot;, qlib::glin(*IN); # print more lines<br/>}<br/>print &#39;- - -&#39;;<br/>1;<br/>__END__<br/><br/>### file plib.pm reads:<br/><br/>package plib;<br/>use strict;<br/><br/>sub ofil {print &quot;.. lib plib&quot;;<br/> open $_[0],$ARGV[0] or die &quot;.. $ARGV[0] not open (p.ofil)&quot;;<br/>}<br/>1;<br/>__END__<br/><br/>### file qlib.pm reads: (line numbers for ref only, not in file)<br/><br/> 1. package qlib; # 10<br/> 2. use strict;<br/> 3. my ($box,$hed,$lin);<br/> 4. <br/> 5. sub glin {print &quot;..&quot;;<br/> 6. $box = shift; $_[0] = &lt;$box&gt;;<br/> 7. }<br/> 8. <br/> 9. sub msep {<br/>10. my $fil = shift;<br/>11. my $z = tell $fil;<br/>12. $_ = &lt;$fil&gt;;<br/>13. print;<br/>14. seek $fil, $z, 0;<br/>15. return 0;<br/>16. }<br/>17. <br/>18. #-------------------------------------------------<br/>19. sub gore { # bogus, not used, but fires diags<br/>20. $hed = &lt;$box&gt; || return;<br/>21. print $hed;<br/>22. while () {<br/>23. $_[0] = &lt;$box&gt; || last;<br/>24. $lin = &lt;$box&gt; || last;<br/>25. $_[0] = &lt;$box&gt; or last;<br/>26. $lin = &lt;$box&gt; or last;<br/>27. ($_[0] = &lt;$box&gt;) || last;<br/>28. ($lin = &lt;$box&gt;) || last;<br/>29. last if eof $box;<br/>30. $lin = &lt;$box&gt;;<br/>31. }<br/>32. }1;<br/>33. __END__<br/><br/>&gt;tdiag.pl<br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at qlib.pm line 26.<br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at qlib.pm line 28.<br/>. perl version: 5.00404<br/>. lib plib<br/>From Hhakl5oSg@pchome.com.tw Thu Apr 1 21:59:58 2004<br/><br/>.1: From Hhakl5oSg@pchome.com.tw Thu Apr 1 21:59:58 2004<br/>.2: Return-Path: &lt;Hhakl5oSg@pchome.com.tw&gt;<br/>.3: Received: from smtp2.enst.fr (reloaded.enst.fr [137.194.2.14])<br/>.4: by email.enst.fr (8.9.3/8.9.3) with ESMTP id VAA14413;<br/>.5: Thu, 1 Apr 2004 21:59:58 +0200 (CEST)<br/>- - -<br/><br/>&gt; tdiag.pl<br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at qlib.pm line 25.<br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at qlib.pm line 26.<br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at qlib.pm line 27.<br/>Value of &lt;HANDLE&gt; construct can be &quot;0&quot;; test with defined() at qlib.pm line 28.<br/>. perl version: 5.006001<br/>. lib plib<br/>From Hhakl5oSg@pchome.com.tw Thu Apr 1 21:59:58 2004<br/><br/>.1: From Hhakl5oSg@pchome.com.tw Thu Apr 1 21:59:58 2004<br/>.2: Return-Path: &lt;Hhakl5oSg@pchome.com.tw&gt;<br/>.3: Received: from smtp2.enst.fr (reloaded.enst.fr [137.194.2.14])<br/>.4: by email.enst.fr (8.9.3/8.9.3) with ESMTP id VAA14413;<br/>.5: Thu, 1 Apr 2004 21:59:58 +0200 (CEST)<br/>- - -<br/><br/>The problem is with sub &quot;gore&quot; in qlib.It is not used, but somehow sends diags. Why ? Could it not be ignored ?<br/><br/>Lines 23 24 30 make no trouble.<br/>Line 25 squeaks with perl 5.006001, not with 5.00404.<br/>Line 26, with same syntax as line 25, squeaks with 5.00404.<br/>Lines 25 27 squeak with perl 5.006001, not with 5.00404.<br/>Lines 26 28 squeak with both perl versions<br/><br/>I&#39;m puzzled. Why is gore interfering at all, and what&#39;s wrong with the squeaking statements ?<br/><br/>Somehow execution proceeds correctly, but the diags are a hindrance.<br/><br/>Thanks for explanations.<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/04/msg287.html Wed, 14 Apr 2004 08:59:41 +0000 Re: [MacPerl-AnyPerl] Sorting a file list by Eelco Alosery Thanks again John,<br/><br/>I will gif it some testing, and testing until i get it done.<br/><br/><br/><br/>Op 30-jan-04 om 11:04 heeft John Delacour het volgende geschreven:<br/><br/>&gt;<br/>&gt; At 12:37 am +0100 30/1/04, Eelco Alosery wrote:<br/>&gt;<br/>&gt;&gt; how do i combine this together<br/>&gt;<br/>&gt; Like this, but now it&#39;s time for _you_ to do some footwork :-)<br/>&gt;<br/>&gt;<br/>&gt; my $db = &quot;/tmp/tmp&quot;;<br/>&gt; my ($date, $s1, $s2);<br/>&gt; open DB, $db;<br/>&gt; for (&lt;DB&gt;) {<br/>&gt; s~^(..)-(..)-(....)(.+)~$3$2$1$4~;<br/>&gt; push @temp, $_ ;<br/>&gt; }<br/>&gt; for (sort @temp) {<br/>&gt; chomp;<br/>&gt; s~(....)(..)(..)(.+)~$3-$2-$1$4~;<br/>&gt; ($date, $s1, $s2) = split /\|/ ;<br/>&gt; $date and print &quot;??? $date ??? $s1 ??? $s2 ??? $/&quot; ;<br/>&gt; }<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg286.html Fri, 30 Jan 2004 03:07:20 +0000 Re: [MacPerl-AnyPerl] Sorting a file list by John Delacour <br/>At 12:37 am +0100 30/1/04, Eelco Alosery wrote:<br/><br/>&gt;how do i combine this together<br/><br/>Like this, but now it&#39;s time for _you_ to do some footwork :-)<br/><br/><br/>my $db = &quot;/tmp/tmp&quot;;<br/>my ($date, $s1, $s2);<br/>open DB, $db;<br/>for (&lt;DB&gt;) {<br/> s~^(..)-(..)-(....)(.+)~$3$2$1$4~;<br/> push @temp, $_ ;<br/>}<br/>for (sort @temp) {<br/> chomp;<br/> s~(....)(..)(..)(.+)~$3-$2-$1$4~;<br/> ($date, $s1, $s2) = split /\|/ ;<br/> $date and print &quot;??? $date ??? $s1 ??? $s2 ??? $/&quot; ;<br/>}<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg285.html Fri, 30 Jan 2004 02:26:12 +0000 Re: [MacPerl-AnyPerl] Unsubscription tips by Chris Nandor At 15:19 +1300 2004.01.30, Dave Horn wrote:<br/>&gt;I haven&#39;t been able to unsubscribe from this list. I&#39;m not entirely<br/>&gt;sure what I&#39;m doing wrong.<br/>&gt;<br/>&gt;Is there a moderator out there who can punt me out?<br/>&gt;<br/>&gt;-dave^h.<br/><br/>[Reply sent to list in case anyone else wants the answer.]<br/><br/>Unsubscribe information is in the header of the email:<br/><br/>List-Post: &lt;mailto:macperl-anyperl@perl.org&gt;<br/>List-Help: &lt;mailto:macperl-anyperl-help@perl.org&gt;<br/>List-Unsubscribe: &lt;mailto:macperl-anyperl-unsubscribe@perl.org&gt;<br/>List-Subscribe: &lt;mailto:macperl-anyperl-subscribe@perl.org&gt;<br/><br/>If that is unsuccessful, email me privately and I will see what I can do (I<br/>don&#39;t have access to the list management, but I can get help from the<br/>admins).<br/><br/>Cheers,<br/><br/>-- <br/>Chris Nandor pudge@pobox.com http://pudge.net/<br/>Open Source Development Network pudge@osdn.com http://osdn.com/<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg284.html Thu, 29 Jan 2004 22:37:04 +0000 Unsubscription tips by Dave Horn I haven&#39;t been able to unsubscribe from this list. I&#39;m not entirely <br/>sure what I&#39;m doing wrong.<br/><br/>Is there a moderator out there who can punt me out?<br/><br/>-dave^h.<br/><br/>--<br/>&quot;This Post May Or May Not Empower You. Your Call.&quot;<br/>Auckland Ultimate Online --- www.ultimate.org.nz/auckland<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg283.html Thu, 29 Jan 2004 19:34:22 +0000 Re: [MacPerl-AnyPerl] Sorting a file list by Eelco Alosery Thanks John,<br/><br/>And when i use this part to open the data file<br/><br/>open (DATABASE, &quot;$database&quot;) || die &quot;Can&#39;t Open $klantfile&quot;;<br/>while(&lt;DATABASE&gt;)<br/>{<br/>($date, $text1, $text2) = split(/\|/,$_);<br/>foreach ($date)<br/>{ <br/>print &lt;&lt;ENDOFTEXT;<br/><br/>some html text<br/>ENDOFTEXT<br/>}<br/>}<br/>close (DATABASE);<br/><br/>how do i combine this together<br/><br/><br/><br/><br/>Op 29-jan-04 om 23:58 heeft John Delacour het volgende geschreven:<br/><br/>&gt;<br/>&gt; At 11:19 pm +0100 29/1/04, Eelco Alosery wrote:<br/>&gt;<br/>&gt;&gt; the strings are formated this way<br/>&gt;&gt;<br/>&gt;&gt; 01-12-2003|some text|soem other text|<br/>&gt;&gt; 03-12-2003|some text|soem other text|<br/>&gt;&gt; 10-12-2003|some text|soem other text|<br/>&gt;<br/>&gt;<br/>&gt; Then it&#39;s very simple:<br/>&gt;<br/>&gt;<br/>&gt; my @temp;<br/>&gt; my @lines = split &quot;\n&quot;, &lt;&lt;_;<br/>&gt; 01-12-2003|some text|soem other text|<br/>&gt; 03-12-2003|some text|soem other text|<br/>&gt; 10-12-2003|some text|soem other text|<br/>&gt; 06-12-2003|some text|soem other text|<br/>&gt; 04-12-2003|some text|soem other text|<br/>&gt; _<br/>&gt; for (@lines) {<br/>&gt; s~^(..)-(..)-(....)(.+)~$3$2$1$4~;<br/>&gt; push @temp, $_ ;<br/>&gt; }<br/>&gt; for (sort @temp) {<br/>&gt; s~(....)(..)(..)(.+)~&lt;div&gt;$3-$2-$1$4&lt;/div&gt;\n~;<br/>&gt; print;<br/>&gt; }<br/>&gt;<br/>&gt; You would substitute &lt;FILEHANDLE&gt; for @lines<br/>&gt;<br/>&gt; JD<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg282.html Thu, 29 Jan 2004 15:38:40 +0000 Re: [MacPerl-AnyPerl] Sorting a file list by John Delacour <br/>At 11:19 pm +0100 29/1/04, Eelco Alosery wrote:<br/><br/>&gt;the strings are formated this way<br/>&gt;<br/>&gt;01-12-2003|some text|soem other text|<br/>&gt;03-12-2003|some text|soem other text|<br/>&gt;10-12-2003|some text|soem other text|<br/><br/><br/>Then it&#39;s very simple:<br/><br/><br/>my @temp;<br/>my @lines = split &quot;\n&quot;, &lt;&lt;_;<br/>01-12-2003|some text|soem other text|<br/>03-12-2003|some text|soem other text|<br/>10-12-2003|some text|soem other text|<br/>06-12-2003|some text|soem other text|<br/>04-12-2003|some text|soem other text|<br/>_<br/>for (@lines) {<br/> s~^(..)-(..)-(....)(.+)~$3$2$1$4~;<br/> push @temp, $_ ;<br/>}<br/>for (sort @temp) {<br/> s~(....)(..)(..)(.+)~&lt;div&gt;$3-$2-$1$4&lt;/div&gt;\n~;<br/> print;<br/>}<br/><br/>You would substitute &lt;FILEHANDLE&gt; for @lines<br/><br/>JD<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg281.html Thu, 29 Jan 2004 14:59:16 +0000 Re: [MacPerl-AnyPerl] Sorting a file list by Eelco Alosery the strings are formated this way<br/><br/>01-12-2003|some text|soem other text|<br/>03-12-2003|some text|soem other text|<br/>10-12-2003|some text|soem other text|<br/>06-12-2003|some text|soem other text|<br/>04-12-2003|some text|soem other text|<br/><br/>Op 29-jan-04 om 23:01 heeft John Delacour het volgende geschreven:<br/><br/>&gt;<br/>&gt; At 9:06 pm +0100 29/1/04, Eelco Alosery wrote:<br/>&gt;<br/>&gt;&gt; I have a data file to where i print lines of data.<br/>&gt;&gt; The firts part of the line contans the date of writing.<br/>&gt;&gt; I uese this kind of line:<br/>&gt;&gt; part1|part2|parst3|<br/>&gt;&gt;<br/>&gt;&gt; Now i want to display the lines in order of date(the first part) to a <br/>&gt;&gt; html file<br/>&gt;&gt; How do i do this whit a cgi script.<br/>&gt;<br/>&gt; What is the format of part1 and of the whole line? Nobody can help <br/>&gt; without knowing that.<br/>&gt;<br/>&gt;<br/>&gt; JD<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg280.html Thu, 29 Jan 2004 14:21:23 +0000 Re: [MacPerl-AnyPerl] Sorting a file list by John Delacour <br/>At 9:06 pm +0100 29/1/04, Eelco Alosery wrote:<br/><br/>&gt;I have a data file to where i print lines of data.<br/>&gt;The firts part of the line contans the date of writing.<br/>&gt;I uese this kind of line:<br/>&gt;part1|part2|parst3|<br/>&gt;<br/>&gt;Now i want to display the lines in order of date(the first part) to <br/>&gt;a html file<br/>&gt;How do i do this whit a cgi script.<br/><br/>What is the format of part1 and of the whole line? Nobody can help <br/>without knowing that.<br/><br/><br/>JD<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg279.html Thu, 29 Jan 2004 14:03:20 +0000 Sorting a file list by Eelco Alosery Hello,<br/><br/>I have a data file to where i print lines of data.<br/>The firts part of the line contans the date of writing.<br/>I uese this kind of line:<br/>part1|part2|parst3|<br/><br/>Now i want to display the lines in order of date(the first part) to a <br/>html file<br/>How do i do this whit a cgi script.<br/><br/>Thanks,<br/>Eelco Alosery<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2004/01/msg278.html Thu, 29 Jan 2004 12:42:54 +0000 Re: Displaying a pauze page when doing a background job by merlyn &gt;&gt;&gt;&gt;&gt; &quot;Eelco&quot; == Eelco Alosery &lt;info@multi-graphics.nl&gt; writes:<br/><br/>Eelco&gt; When it is checking a domain, i want to show a page like, now checking<br/>Eelco&gt; the domain.<br/>Eelco&gt; When the domain is checked, it must display the result.<br/><br/>Is this for CGI? Or just at a command line?<br/><br/>If for CGI, try the code at<br/>&lt;http://www.stonehenge.com/merlyn/LinuxMag/col39.html&gt;.<br/><br/>-- <br/>Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095<br/>&lt;merlyn@stonehenge.com&gt; &lt;URL:http://www.stonehenge.com/merlyn/&gt;<br/>Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.<br/>See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/10/msg277.html Wed, 15 Oct 2003 08:58:45 +0000 Displaying a pauze page when doing a background job by Eelco Alosery Hello,<br/><br/>How can i display a pauze page when my perl program is doing a job like <br/>checking a domain.<br/><br/>When it is checking a domain, i want to show a page like, now checking <br/>the domain.<br/>When the domain is checked, it must display the result.<br/><br/>How do i do this<br/>And please can you giff me an example<br/><br/>Thanks<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/10/msg276.html Tue, 14 Oct 2003 14:42:25 +0000 Re: [MacPerl-AnyPerl] recursive regex by Nicholas Thornton --- John Delacour &lt;JD@BD8.COM&gt; wrote:<br/>&gt; Can&#39;t you just use s///ge ?<br/>[snip helpful example]<br/><br/>Now that I look that up, it should work fine. Thanks.<br/>Yeah, I haven&#39;t really done enough higher end regexes<br/>to know all the things that go after the last slash.<br/>This is just what I was looking for :)<br/><br/>~wren<br/><br/>__________________________________<br/>Do you Yahoo!?<br/>Yahoo! SiteBuilder - Free, easy-to-use web site design software<br/>http://sitebuilder.yahoo.com<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg275.html Thu, 28 Aug 2003 02:29:41 +0000 Re: [MacPerl-AnyPerl] recursive regex by John Delacour Can&#39;t you just use s///ge ?<br/><br/><br/>#!/usr/bin/perl<br/>@lines = split $/, &lt;&lt;EOL;<br/>beginend<br/>begin1+0end<br/>begin1+1endbegin&#39; $ENV{HOME}&#39;end<br/>begin1+2end<br/>begin1+3end<br/>begin sprintf q~%.05\d~, 5endbegin sprintf q~%.05\d~, 6end<br/>EOL<br/>for (@lines) {<br/> s~begin(.*?)end~eval $1~ge ;<br/> print &quot;$_$/&quot; ;<br/>}<br/><br/><br/>At 1:20 am -0700 28/8/03, Nicholas Thornton wrote:<br/>&gt;I have a regex I&#39;m performing on a file that takes a<br/>&gt;given string, manipulates it, and replaces the string<br/>&gt;with the new string. I want this do be done<br/>&gt;recursively on each line in case there are multiple<br/>&gt;sections that need to be dealt with. I&#39;m currently<br/>&gt;using something like:<br/>&gt;<br/>&gt;while(&lt;$file&gt;){<br/>&gt; WHILE:while() {<br/>&gt; if ($string =~ /begin(.*?)end/) {<br/>&gt; my $perl = $1;<br/>&gt; my $eval = eval $perl;<br/>&gt; $string =~s/begin.*?end/$eval/;<br/>&gt; } else {last WHILE}<br/>&gt; }<br/>&gt;}<br/>&gt;<br/>&gt;It looks sort of clunky to me, and I don&#39;t trust the<br/>&gt;subsitution even if it does work, but I can&#39;t seem to<br/>&gt;get it to work using $perl or $1 in place of the<br/>&gt;/.*?/. I was wondering if anyone had any suggestions<br/>&gt;for making it nicer, shorter, or cleaner?<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg274.html Thu, 28 Aug 2003 02:04:16 +0000 recursive regex by Nicholas Thornton I have a regex I&#39;m performing on a file that takes a<br/>given string, manipulates it, and replaces the string<br/>with the new string. I want this do be done<br/>recursively on each line in case there are multiple<br/>sections that need to be dealt with. I&#39;m currently<br/>using something like:<br/><br/>while(&lt;$file&gt;){<br/> WHILE:while() {<br/> if ($string =~ /begin(.*?)end/) {<br/> my $perl = $1;<br/> my $eval = eval $perl;<br/> $string =~s/begin.*?end/$eval/;<br/> } else {last WHILE}<br/> }<br/>}<br/><br/>It looks sort of clunky to me, and I don&#39;t trust the<br/>subsitution even if it does work, but I can&#39;t seem to<br/>get it to work using $perl or $1 in place of the<br/>/.*?/. I was wondering if anyone had any suggestions<br/>for making it nicer, shorter, or cleaner?<br/><br/>~wren<br/><br/>__________________________________<br/>Do you Yahoo!?<br/>Yahoo! SiteBuilder - Free, easy-to-use web site design software<br/>http://sitebuilder.yahoo.com<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg273.html Thu, 28 Aug 2003 01:22:09 +0000 RE: [MacPerl-AnyPerl] Re: check email adress by Bedsole Jay-RWDD30 &gt; You send email to it instructing the user to click a particular unique<br/>&gt; URL, and wait for the click.<br/><br/>You know, I&#39;ve never felt compelled to bite that hook in the past, but<br/>somehow... the way you tell it... it almost seems... well, compelling.<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg272.html Thu, 21 Aug 2003 22:17:20 +0000 Re: check email adress by merlyn &gt;&gt;&gt;&gt;&gt; &quot;Eelco&quot; == Eelco Alosery &lt;info@multi-graphics.nl&gt; writes:<br/><br/>Eelco&gt; How can I check if a email adress REALY exists, I know how to check if<br/>Eelco&gt; it has the richt syntacs, but i want to know if it also realy exists.<br/><br/>You send email to it instructing the user to click a particular unique<br/>URL, and wait for the click.<br/><br/>-- <br/>Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095<br/>&lt;merlyn@stonehenge.com&gt; &lt;URL:http://www.stonehenge.com/merlyn/&gt;<br/>Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.<br/>See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg271.html Thu, 21 Aug 2003 16:43:07 +0000 check email adress by Eelco Alosery How can I check if a email adress REALY exists, I know how to check if <br/>it has the richt syntacs, but i want to know if it also realy exists.<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg270.html Thu, 21 Aug 2003 10:35:17 +0000 Fwd: [MacPerl-AnyPerl] Spliting a string by Eelco Alosery <br/><br/>Begin doorgestuurd bericht:<br/><br/>&gt; Van: Eelco Alosery &lt;info@multi-graphics.nl&gt;<br/>&gt; Datum: maa, 18 aug 2003 22:14:57 Europe/Amsterdam<br/>&gt; Aan: Morbus Iff &lt;morbus@disobey.com&gt;<br/>&gt; Onderwerp: Antw.: [MacPerl-AnyPerl] Spliting a string<br/>&gt;<br/>&gt; Thaks for your reply,<br/>&gt;<br/>&gt; But the string i want to read is from a cookie and i have put the <br/>&gt; string i $string<br/>&gt;<br/>&gt; The string lengt cab be varius lengts, not hust 3 text fields or 7 but <br/>&gt; also more or less.<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; Morbus Iff heeft op maandag, 18 aug 2003 om 22:07 (Europe/Amsterdam) <br/>&gt; het volgende geschreven:<br/>&gt;<br/>&gt;&gt; &gt;I want to split a string into servral partsThe string starts whith ##<br/>&gt;&gt; &gt;than the text and than again ## but the string lent is not a fixed <br/>&gt;&gt; sise.<br/>&gt;&gt;<br/>&gt;&gt; &gt;##text1##text2##text3##<br/>&gt;&gt; &gt;##text1##text2##text3##text4##text5##text6##text7##<br/>&gt;&gt;<br/>&gt;&gt; my (@splits) = split(/##/, $_);<br/>&gt;&gt; print $splits[1]; # text1<br/>&gt;&gt; print $splits[2]; # text2<br/>&gt;&gt; print $splits[3]; # text3<br/>&gt;&gt; print $splits[4] if defined $splits[4]; # text4<br/>&gt;&gt; print $splits[5] if defined $splits[5]; # text5<br/>&gt;&gt; .<br/>&gt;&gt; .<br/>&gt;&gt; .<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; -- <br/>&gt;&gt; Morbus Iff ( i put the demon back in codemonkey )<br/>&gt;&gt; Culture: http://www.disobey.com/ and http://www.gamegrene.com/<br/>&gt;&gt; Buy My Book! http://amazon.com/exec/obidos/ASIN/0596004605/disobeycom<br/>&gt;&gt; icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus<br/>&gt;&gt;<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg269.html Mon, 18 Aug 2003 14:34:41 +0000 Re: [MacPerl-AnyPerl] Spliting a string by John Delacour At 10:04 pm +0200 18/8/03, Eelco Alosery wrote:<br/>&gt;I want to split a string into servral partsThe string starts whith <br/>&gt;## than the text and than again ## but the string lent is not a <br/>&gt;fixed sise.<br/>&gt;It can by:<br/>&gt;##text1##text2##text3##<br/>&gt;but also longer like:<br/>&gt;##text1##text2##text3##text4##text5##text6##text7##<br/>&gt;<br/>&gt;I want to split this string zo i can display the text each on a <br/>&gt;seperat line or eddit the text<br/><br/><br/>Just use split:<br/><br/>#!/usr/bin/perl<br/>$s = qq~##text1##text22##text333##text4444##text5555~;<br/>@parts = split qq~##~, $s ;<br/>for (@parts) {<br/> print qq~$_$/~ if /./ ;<br/>}<br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg268.html Mon, 18 Aug 2003 13:43:38 +0000 Spliting a string by Eelco Alosery I want to split a string into servral partsThe string starts whith ## <br/>than the text and than again ## but the string lent is not a fixed sise.<br/>It can by:<br/>##text1##text2##text3##<br/>but also longer like:<br/>##text1##text2##text3##text4##text5##text6##text7##<br/><br/>I want to split this string zo i can display the text each on a seperat <br/>line or eddit the text<br/><br/>I know how to split a sfixed string, i use this:<br/><br/>open (DATABASE, &quot;$dir/test.file&quot;) || die &quot;Kan bestand niet openen&quot;;<br/>while(&lt;DATABASE&gt;)<br/> {<br/>($id_nummer, $naam, $email, $vraag) = split(/\|/,$_);<br/>foreach ($id_nummer) {<br/>#play whith the string<br/>}<br/>close(DATABASE);<br/><br/>But i dont think i can use this script for what i want to do now<br/><br/> http://www.nntp.perl.org/group/perl.macperl.anyperl/2003/08/msg267.html Mon, 18 Aug 2003 13:04:24 +0000