<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1012031" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1012031</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069643</link>
    <description> &lt;p&gt;I am looking at how to get rid of duplications but I will have to play around wityh it all when I get a chance and find out the best way of doing things.&lt;/p&gt;
&lt;p&gt;Thanks &lt;/p&gt;
&lt;p&gt;[edit] Just tried the script and after some tiny tweaking it works fine Wahay:D&lt;br /&gt;
thanks[/edit]&lt;/p&gt;
&lt;p&gt;[Edited by minton on 08-17-2000 at 09:26 AM]&lt;/p&gt;
 </description>
     <pubDate>Thu, 17 Aug 2000 10:43:38 +0000</pubDate>
 <dc:creator>minton</dc:creator>
 <guid isPermaLink="false">comment 1069643 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069628</link>
    <description> &lt;p&gt;Do you want to append the file each time?  If you do that you could get duplicates.  If you append to the file each time, you should make a routine that eliminates duplicates.&lt;/p&gt;
&lt;p&gt;I would just re-write the file each time.&lt;br /&gt;
open (LIST, &quot;&amp;gt;/WebSites/hosted/dotcomper.co.uk/cgi-bin/testscan/mememails.txt&quot;) || die &quot;Can&#039;t open handle LIST: $!\n&quot;;&lt;br /&gt;
Just one &lt;strong&gt;&amp;gt;&lt;/strong&gt; in the open()&lt;/p&gt;
 </description>
     <pubDate>Thu, 17 Aug 2000 05:53:51 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1069628 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069623</link>
    <description> &lt;p&gt;Glad to be of help. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Richard&lt;br /&gt;
richjb::406&lt;/p&gt;
 </description>
     <pubDate>Thu, 17 Aug 2000 00:34:55 +0000</pubDate>
 <dc:creator>richjb</dc:creator>
 <guid isPermaLink="false">comment 1069623 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069617</link>
    <description> &lt;p&gt;OK, I will use your version, &lt;/p&gt;
&lt;p&gt;Thanks alot &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Aug 2000 23:12:25 +0000</pubDate>
 <dc:creator>minton</dc:creator>
 <guid isPermaLink="false">comment 1069617 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069616</link>
    <description> &lt;p&gt;Who programmed that?  I see two errors in it...&lt;/p&gt;
&lt;p&gt;Also, remember that *nix is case sensitive, so check the file names.&lt;/p&gt;
&lt;p&gt;I see the error, when printing to the &quot;file,&quot; you have not specified a handle...so it would be printing out to the screen.  You need to use print LIST &quot;&quot;;&lt;/p&gt;
&lt;p&gt;Here&#039;s the file with any problems I see fixed:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#!/usr/bin/perl&lt;br /&gt;############################################&lt;br /&gt;# Scan contents of Account Manager Lite &lt;br /&gt;# members detals file and put in a seperate&lt;br /&gt;# file named &amp;quot;mememails.txt&amp;quot;&lt;br /&gt;############################################&lt;br /&gt;print &amp;quot;Content-type: text/html\n\n&amp;quot;;&lt;br /&gt;print &amp;quot;Completed\n&amp;quot;; # &amp;lt;strong&amp;gt;This should be at the end of the program, sometimes Perl won&amp;#039;t do something right and will stop, but you really don&amp;#039;t know when your &amp;quot;confirmation&amp;quot; print is at the beginning.&amp;lt;/strong&amp;gt;&lt;br /&gt;&lt;br /&gt;open(FILE, &amp;quot;&amp;lt;/WebSites/hosted/dotcomper.co.uk/cgi-bin/testscan/amdata.db&amp;quot;) || die &amp;quot;Can&amp;#039;t open $file: $!\n&amp;quot;; # &amp;lt;strong&amp;gt;Check this for case sensitivity.&amp;lt;/strong&amp;gt;&lt;br /&gt;@array = &amp;lt;FILE&amp;gt;; # I&amp;#039;m now assigning the data of the file to an array so we can loop through it.&lt;br /&gt;close(FILE);&lt;br /&gt;&lt;br /&gt;foreach $lines (@array) {&lt;br /&gt; chomp($lines); #this will removed the \n at the end of the lines&lt;br /&gt; @info = split(/:/, $lines); #this now splits the line up by :&lt;br /&gt;&amp;amp;add;&lt;br /&gt;}&lt;br /&gt;#############################################&lt;br /&gt;&lt;br /&gt;sub add {&lt;br /&gt;open (LIST, &amp;quot;&amp;gt;&amp;gt;/WebSites/hosted/dotcomper.co.uk/cgi-bin/testscan/mememails.txt&amp;quot;) || die &amp;quot;Can&amp;#039;t open&amp;quot;; # &amp;lt;strong&amp;gt;Check for case sensitivity&amp;lt;/strong&amp;gt;&lt;br /&gt;{ # &amp;lt;strong&amp;gt;Ommit this&amp;lt;/strong&amp;gt;&lt;br /&gt;print &amp;quot;\n$info[2]\n&amp;quot;; # &amp;lt;strong&amp;gt;The first \n will cause this to print every other line, also, you need to print to LIST&amp;lt;/strong&amp;gt;&lt;br /&gt;close (LIST) # &amp;lt;strong&amp;gt;Where&amp;#039;s the ; ?&amp;lt;/strong&amp;gt;&lt;br /&gt;} # &amp;lt;strong&amp;gt;Ommit this&amp;lt;/strong&amp;gt;&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Another thing is that the above code opens and closes the file being written to for evey line in the old file...so say you have 400 lines, then that program will open and closee the new file 400 times.&lt;/p&gt;
&lt;p&gt;Suggested code:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;print &amp;quot;Content-type: text/html\n\n&amp;quot;;&lt;br /&gt;&lt;br /&gt;open(FILE, &amp;quot;&amp;lt;/WebSites/hosted/dotcomper.co.uk/cgi-bin/testscan/amdata.db&amp;quot;) || die &amp;quot;Can&amp;#039;t open handle FILE: $!\n&amp;quot;;&lt;br /&gt;@array = &amp;lt;FILE&amp;gt;;&lt;br /&gt;close(FILE);&lt;br /&gt;&lt;br /&gt;open (LIST, &amp;quot;&amp;gt;&amp;gt;/WebSites/hosted/dotcomper.co.uk/cgi-bin/testscan/mememails.txt&amp;quot;) || die &amp;quot;Can&amp;#039;t open handle LIST: $!\n&amp;quot;;&lt;br /&gt;&lt;br /&gt;foreach $lines (@array) {&lt;br /&gt; chomp($lines);&lt;br /&gt; @info = split(/:/, $lines);&lt;br /&gt; print LIST &amp;quot;$info[2]\n&amp;quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;close (LIST);&lt;br /&gt;&lt;br /&gt;print &amp;quot;done&amp;quot;;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Hope that helped.&lt;/p&gt;
&lt;p&gt;Richard&lt;br /&gt;
richjb::401&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Aug 2000 23:02:38 +0000</pubDate>
 <dc:creator>richjb</dc:creator>
 <guid isPermaLink="false">comment 1069616 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069613</link>
    <description> &lt;p&gt;hi again, &lt;/p&gt;
&lt;p&gt;I have just got around to trying it all out and have come to this hitch.&lt;/p&gt;
&lt;p&gt;it seems to work but when i look at the mememails.txt file it is empty.&lt;/p&gt;
&lt;p&gt;the code&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#!/usr/bin/perl&lt;br /&gt;############################################&lt;br /&gt;# Scan contents of Account Manager Lite &lt;br /&gt;# members detals file and put in a seperate&lt;br /&gt;# file named &amp;quot;mememails.txt&amp;quot;&lt;br /&gt;############################################&lt;br /&gt;print &amp;quot;Content-type: text/html\n\n&amp;quot;;&lt;br /&gt;print &amp;quot;Completed\n&amp;quot;;&lt;br /&gt;&lt;br /&gt;open(FILE, &amp;quot;&amp;lt;/WebSites/hosted/dotcomper.co.uk/cgi-bin/testscan/amdata.db&amp;quot;) || die &amp;quot;Can&amp;#039;t open $file: $!\n&amp;quot;;&lt;br /&gt;@array = &amp;lt;FILE&amp;gt;; # I&amp;#039;m now assigning the data of the file to an array so we can loop through it.&lt;br /&gt;close(FILE);&lt;br /&gt;&lt;br /&gt;foreach $lines (@array) {&lt;br /&gt; chomp($lines); #this will removed the \n at the end of the lines&lt;br /&gt; @info = split(/:/, $lines); #this now splits the line up by :&lt;br /&gt;&amp;amp;add;&lt;br /&gt;}&lt;br /&gt;#############################################&lt;br /&gt;&lt;br /&gt;sub add {&lt;br /&gt;open (LIST, &amp;quot;&amp;gt;&amp;gt;/WebSites/hosted/dotcomper.co.uk/cgi-bin/testscan/mememails.txt&amp;quot;) || die &amp;quot;Can&amp;#039;t open&amp;quot;; {&lt;br /&gt;print &amp;quot;\n$info[2]\n&amp;quot;;&lt;br /&gt;close (LIST)&lt;br /&gt;}&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;Any help would be great.&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Aug 2000 22:15:51 +0000</pubDate>
 <dc:creator>minton</dc:creator>
 <guid isPermaLink="false">comment 1069613 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069381</link>
    <description> &lt;p&gt;Ok. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;BTW, I have had experience with account manager lite in the past.&lt;/p&gt;
&lt;p&gt;I hope it all works out for you. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;
 </description>
     <pubDate>Sun, 13 Aug 2000 20:59:55 +0000</pubDate>
 <dc:creator>richjb</dc:creator>
 <guid isPermaLink="false">comment 1069381 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069376</link>
    <description> &lt;p&gt;no, I want to email all of our customers. we are using account manager lite. I dont know if you are familiar with it but it is a great script. it is though, unfortunately, expensive to buy the full version and so some of the features in the lite version have gone, namely the email customers feature.&lt;/p&gt;
&lt;p&gt;So unless I want to individually email all the users, i need a way to email all the people at once. and here enters &lt;/p&gt;
&lt;p&gt;*drum role*&lt;/p&gt;
&lt;p&gt;my script &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;All the customer is stored in one file with each customers info being stored in the format i showed earlier. I will use your scanner (albeit a supped up version) and scan the customer file for all the emails. I will then write them to a email file so in the end i will have a file seperate from the customer file with all their email&#039;s.&lt;/p&gt;
&lt;p&gt;i can then use this file in conjunction with my not yet existing mail script...&lt;/p&gt;
&lt;p&gt;simple &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 13 Aug 2000 20:33:54 +0000</pubDate>
 <dc:creator>minton</dc:creator>
 <guid isPermaLink="false">comment 1069376 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069374</link>
    <description> &lt;p&gt;Just curious...but why are you &quot;exporting&quot; the emails?  Do you have another program like Pegasus to send out the mail?&lt;/p&gt;
&lt;p&gt;Just a tip: make the script send out the email for you. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Richard&lt;/p&gt;
 </description>
     <pubDate>Sun, 13 Aug 2000 19:57:10 +0000</pubDate>
 <dc:creator>richjb</dc:creator>
 <guid isPermaLink="false">comment 1069374 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/scanning-file-and-taking-info#comment-1069370</link>
    <description> &lt;p&gt;hey Richard, &lt;/p&gt;
&lt;p&gt;I will try your code and report back, &lt;/p&gt;
&lt;p&gt;what I will do will be to take the email addresses and create a new file and put all of them in, I shuld be able to do that without too many problems though &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Thanks alot for your help&lt;/p&gt;
 </description>
     <pubDate>Sun, 13 Aug 2000 19:21:06 +0000</pubDate>
 <dc:creator>minton</dc:creator>
 <guid isPermaLink="false">comment 1069370 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
