Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

perl-beginner · Perl Beginners Mailing List

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 3766
  • Category: Perl
  • Founded: Aug 2, 1998
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 4215 - 4244 of 27464   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#4215 From: James Kralec <mkralec@...>
Date: Sun Jul 1, 2001 2:11 pm
Subject: Re: [PBML] Simple split() question
mkralec@...
Send Email Send Email
 
Try this.  It has to be changed a little if you expect more than two
"strings" between the parenthesis, but it should get you started.  Of course,
there may well be a better way to go at this, but this works.
Mike

#!/perl/bin/perl.exe

open(TF, "test.txt") or die "Couldn't open test.txt";

while ($line = <TF>) {
  $num = 1;
  foreach (split " ", $line) {
   $par = "par" . $num;
   if (m/(\"[\d\w]+)/g) {
    $quoted = $1;
   } elsif (m/([\d\w]+\")/g) {
    $$par = $quoted . " " . $1;
    $num++;
   } else {
    $$par = $_;
    $num++;
   }
  }
  print "$par1, $par2, $par3, $par4, $par5\n";
}

close TF;

exit;

This prints:  xyz, abc, 12sd, "pqr stz", dfg

sbasak@... wrote:

> Hi,
>
> I want to perform a simple split operation, but can't get the regular
> expr working. Can anybody help me on this?
>
> my $line from a file read is:
> xyz abc 12sd "pqr stz" dfg (delimited by blank char).
> I'm doing
> my ($par1, $par2, $par3, $par4, $par5) = split(/ /, $line);
> and I'm getting
> $par4 = "pqr
> $par5 = stz", which I don't want.
>
> I want $par4 = "pqr stz", & $par5 = dfg
>
> Thanks in advance.
> -Basak
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#4216 From: المهندس™ <almuhands@...>
Date: Sun Jul 1, 2001 2:18 pm
Subject: حملة نداء الأقصى
almuhands@...
Send Email Send Email
 
نأس للخروج عن موضوع القائمة فمواضيع الأمة اهم
 
 
 
لمدة شهر كامل بدأ من السبت القادم بالتضامن مع اسلام واي - مجاهدون اون لاين
 - و الموسوعة العربية للكمبيوتر و الإنترنت والمشاركه مفتوحة للجميع دون تسجيل
 
حملة شاملة تدعو إلى محاربة أعداء الإسلام و في مقدمتهم أعداء القضية الفلسطينية
+ تجديد المقاطعة للمنتجات الأمريكية.....
تدمير مواقعهم
مقاطعة المنتجات الامريكية
رفع معنويات الشعب الفلسطسني
 المطلوب من الجميع المشاركة في هذا العمل الذي نتمنى أن يوقظ الضمائر و خصوصا بعد المهازل التي يقيمها أعداء الله
في فلسطين في الفترة الأخيرة !
 
 
ملاحظة يمكنكم المشاركة في منتدى نداء الاقصى دون الحاجة لتسجيل اشتراك
 
تابع اخر اخبار
الحملة
من
موقع المهندس

#4217 From: <malaikat@...>
Date: Sun Jul 1, 2001 3:02 pm
Subject: How to make double work
malaikat@...
Send Email Send Email
 
Hi everyone! ;)

I just need to know on how to create a double work 'post-method' using Perl
from a different server. I have an account in paid-hosting, and I also have
an account in free-hosting that support perl. My question is:

#--Question:

Say I have a guestbook.pl in my paid-hosting. What
script-lines that I should enter into the guestbook.pl
within my paid-hosting so that it could also send the
queries straight to the guestbook-infree.pl on the
free-webhosting?

#--End_Of_Question

So that it will automaticaly creating a backup inside a free-hosting,
whenever there is somebody giving queries into my guestbook forms from the
main page @ paid-hosting. Of course I have also prepared files-content that
are almost the same as the paid-hosting (the file that will be written @
free-host).

Thanks in advance.


Regards,

Malai

#4218 From: "Franki" <frankieh@...>
Date: Sun Jul 1, 2001 3:32 pm
Subject: Some questions about stuff..
frankieh@...
Send Email Send Email
 
Hi everyone...

I am sorry to be a bother, but I have a couple of questions I would like to
here your word on...


1. I have to encryption modules that we use for generating a checksum to
make sure that what is sent in a form post is what gets received at the
other end..
We need to give away this script to lots of people, and the checksum modules
will be useless if everyone knows how it is done.. So I am wondering if its
possible to use compiled binaries for the modules and access them from a
standard perl script??  also, we need to do it for both the unix version of
the script and also the windows version...

or is there some other way to protect the source of the modules??? (they are
called directly by the script, not installed in the perl modules
directories..)

2. URL strings not working if there are spaces....  like so:
&SHIPMETHOD=Ground%20Shipping

This works ok in the unix version of the script, but the win32 one stops
dead at &SHIPMETHOD=Ground (ie it stops on the first space and all following
pairs are ignored...  so the script fails,

The only stuff that is changed between the two versions is the path to lib
statements, and stuff like that, the actual code is the same.

3. I am wondering if it is safe to use $ENV{'PATH_TRANSLATED'} to initially
set the value of my $PaTh variable for my NT/2000 version of my scipt..
(after stripping of the pl file at the end of the string that
$ENV{'PATH_TRANSLATED'} produces..

is it safe to do this? I was thinking of using it when the script is first
run, and then the script asks if the path is correct and if so writes it
permanently to file so that $ENV{'PATH_TRANSLATED'} need never be used
again...



Any help suggestions, critism, general comments, anything,,, would be most
appreciated...




kindest regards

Frank

#4219 From: "Franki" <frankieh@...>
Date: Sun Jul 1, 2001 4:12 pm
Subject: testing the start of a string..
frankieh@...
Send Email Send Email
 
Hi again all..

I have another small question,

if I have a variable,, say: $myVar="a:bigLongString"

and I want to test for the presense of a:big at the start of it.. (and it
must allow for either upper or lower case)

what would be the easiest way of doing that?
should I use split to take off the chars 0 though 4 and use an if/or
statement to compare it to a:big or A:BIG ?

what happens then if its mixed case?  how can I tell it to ignore case
altogether?

also, if I want to test for the presence of String and remove it if its
there, do I use the same method?

I am trying to find a relivent section in my perl books, but I have read 40
pages so far and haven't found anything relivent..

and there is probably two dozen people in this list who could answer off the
top of their head...

any response would be kindly appreciated..

regards

Frank






-----Original Message-----
From: Franki [mailto:frankieh@...]
Sent: Sunday, 1 July 2001 11:33 PM
To: perl-beginner@yahoogroups.com
Subject: [PBML] Some questions about stuff..



Hi everyone...

I am sorry to be a bother, but I have a couple of questions I would like to
here your word on...


1. I have to encryption modules that we use for generating a checksum to
make sure that what is sent in a form post is what gets received at the
other end..
We need to give away this script to lots of people, and the checksum modules
will be useless if everyone knows how it is done.. So I am wondering if its
possible to use compiled binaries for the modules and access them from a
standard perl script??  also, we need to do it for both the unix version of
the script and also the windows version...

or is there some other way to protect the source of the modules??? (they are
called directly by the script, not installed in the perl modules
directories..)

2. URL strings not working if there are spaces....  like so:
&SHIPMETHOD=Ground%20Shipping

This works ok in the unix version of the script, but the win32 one stops
dead at &SHIPMETHOD=Ground (ie it stops on the first space and all following
pairs are ignored...  so the script fails,

The only stuff that is changed between the two versions is the path to lib
statements, and stuff like that, the actual code is the same.

3. I am wondering if it is safe to use $ENV{'PATH_TRANSLATED'} to initially
set the value of my $PaTh variable for my NT/2000 version of my scipt..
(after stripping of the pl file at the end of the string that
$ENV{'PATH_TRANSLATED'} produces..

is it safe to do this? I was thinking of using it when the script is first
run, and then the script asks if the path is correct and if so writes it
permanently to file so that $ENV{'PATH_TRANSLATED'} need never be used
again...



Any help suggestions, critism, general comments, anything,,, would be most
appreciated...




kindest regards

Frank







Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#4220 From: "Franki" <frankieh@...>
Date: Sun Jul 1, 2001 5:25 pm
Subject: One last question...
frankieh@...
Send Email Send Email
 
Hi all,

This list is unusually quiet tonight... but I'll ask anyway in case an
expert is on hand to offer advice..

I have this loop:

    foreach $tag ( sort ( keys %form ) )
	 {

		 $redirect .= "&" . $tag . "=" . $form{ $tag };
	 }

	 # Now re-direct the browser
    print "Location: $redirect\n\n";

  Basically, it is creating a post url with all the keypairs in it..

I need to add a line or two to it, to check the values, and if they contain
any spaces.. to swap the spaces to something like
%20  so that the spaces don't cause everything after the first one to be
ignored and not added to the url...

Think I am alittle over my head here, I am still new to this....


any help would be most appreciated.

Kindest regards


Frank

#4221 From: "Charles K. Clarkson" <c_clarkson@...>
Date: Sun Jul 1, 2001 6:54 pm
Subject: Re: [PBML] Simple split() question
c_clarkson@...
Send Email Send Email
 
<sbasak@...>

: Hi,
:
: I want to perform a simple split operation, but can't
: get the regular expr working. Can anybody help me on
: this?
:
: my $line from a file read is:
: xyz abc 12sd "pqr stz" dfg (delimited by blank char).
: I'm doing
: my ($par1, $par2, $par3, $par4, $par5) = split(/ /, $line);
: and I'm getting
: $par4 = "pqr
: $par5 = stz", which I don't want.
:
: I want $par4 = "pqr stz", & $par5 = dfg
:

     Take a look at perlfaq4:
     'How can I split a [character] delimited string except
when inside [character]? (Comma-separated files)'

HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.

#4222 From: "Charles K. Clarkson" <c_clarkson@...>
Date: Sun Jul 1, 2001 7:10 pm
Subject: Re: [PBML] strange problem creating /opening file..
c_clarkson@...
Send Email Send Email
 
Franki <frankieh@...> wrote:

: Hi all,
:
:
: I have a script that creates a unique file for each person
: that use it.. and the file is used to track their
: progress...
:
: for some reason, it works on Linux/unix servers, but not
: on the NT/2000 test server with IIS5 and activeperl...
:
: here is the line in question..
:
: open (CART, "+>>$sc_cart_path") ||
:        &file_open_error("$sc_cart_path", "Add to Cart",
:                             __FILE__, __LINE__);
:
: now $sc_cart_path is basically the explicit path to the
: directory, with the new unique file name tacked onto
: the end..
:
: doesn't +>> mean that open the file and append to it if
: possible, or if file doesn't exist create it??

     No, (well sort of). According to the manual
(perlfunc 'open'):

     'If MODE is '>>', the file is opened for appending,
      again being created if necessary. You can put a
      '+' in front of the '>' or '<' to indicate that
      you want both read and write access'

     If '+>>' isn't working thy separating reads and
writes. Open the file for reading, close it, open it
for appending, close it, repeat as necesary. Using
'+>>' is supposed to work, but doesn't always.

:
: it doesn't work though,, I get an error message stating:
: FILE OPEN
:
ERROR-Inetpub/Scripts/cgi-bin-2000/scripts/gshop/shopping_carts/8679809.1548
: |FILE=C:\Inetpub\Scripts\cgi-bin-2000\scripts\gshop\gshop.cgi|LINE=637
:
: even if I manually create the file, the script won't write
: to it... and still reports the error.
:
: I have many other instances in this script that write to
: existing files, and they do that just fine, but this is
: the only one that creates a file each time it runs..
:
: the file name is usually something like: 8679809.1548
: with is long and obtuse to make sure it is unique...
:
:
: does anyone know what I am doing wrong ? its driving me
: nuts.. I have been staring at the script for hours to
: now avail...
:

#4223 From: "Charles K. Clarkson" <c_clarkson@...>
Date: Sun Jul 1, 2001 7:16 pm
Subject: Re: [PBML] Parallel port
c_clarkson@...
Send Email Send Email
 
<steve@...>
:
: Surely our assembler program will compile under linux?
:
:
: Steve
: Webmaster/Programmer
:
:
: ----- Original Message -----
: From: <ykep@...>
: To: <perl-beginner@yahoogroups.com>
: Sent: Saturday, June 30, 2001 7:18 AM
: Subject: [PBML] Parallel port
:
:
: > HI, everyone.
: >
: > I want to control parallel port, sending each data to
: > datapin ( pin2-9 ) and reading from signal pin, i
: > guess that's a 'raw' control, so how exactly do i
: > do that with perl from linux ? I'm just recently
: > learn perl, so could you give me an example.
: > I can do that from windows/dos using assembler,
: > but i really need to do that using perl, or is there
: > a way to use assembler or c from perl ?

     I think someone asked about serial ports a few months
back and found a module on CPAN that did the trick. Have
you tried: http://search.cpan.org/.

HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.

#4224 From: "Charles K. Clarkson" <c_clarkson@...>
Date: Sun Jul 1, 2001 7:31 pm
Subject: Re: [PBML] testing the start of a string..
c_clarkson@...
Send Email Send Email
 
Franki <frankieh@...>

: Hi again all..
:
: I have another small question,
:
: if I have a variable,, say: $myVar="a:bigLongString"
:
: and I want to test for the presense of a:big at the
: start of it.. (and it must allow for either upper or
: lower case)
:
: what would be the easiest way of doing that?
: should I use split to take off the chars 0 though 4
: and use an if/or statement to compare it to a:big
: or A:BIG ?
: what happens then if its mixed case?  how can I tell it
: to ignore case altogether?

     Use substr is faster, but I prefer regular
expressions:
     my $my_var = 'a:bigLongString';
     if ($my_var =~ /^(a:big)/i) {
         # this is a case-insensitve match
         # see perlre for lots more info
         # $1 contains the exact match
     } else {
         # this line failed
     }

: also, if I want to test for the presence of String
: and remove it if its there, do I use the same method?

     Try substituion (see perlfunc and perlre):
     if ($my_var =~ s/^(a:big)//i) {
         # $1 contains the match and
         # $my_var = 'LongString'
     }
:
: I am trying to find a relivent section in my perl books,
: but I have read 40 pages so far and haven't found
: anything relivent..

     Look in perlfunc under 'Perl Functions by Category',
then look under the heading: 'Functions for SCALARs or
strings'. Play with substr as well as m// and s///.

HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.

#4225 From: "Charles K. Clarkson" <c_clarkson@...>
Date: Sun Jul 1, 2001 7:39 pm
Subject: Re: [PBML] One last question...
c_clarkson@...
Send Email Send Email
 
Franki <frankieh@...>

:
: Hi all,
:
: This list is unusually quiet tonight... but I'll
: ask anyway in case an expert is on hand to offer
: advice..
:
: I have this loop:
:
:    foreach $tag ( sort ( keys %form ) )
: {
:
: $redirect .= "&" . $tag . "=" . $form{ $tag };

     Could write as:
     $redirect .= "\&$tag=$form{$tag}";

: }
:
: # Now re-direct the browser
:    print "Location: $redirect\n\n";
:
:  Basically, it is creating a post url with all the
: keypairs in it..
:
: I need to add a line or two to it, to check the values,
: and if they contain any spaces.. to swap the spaces to
: something like %20  so that the spaces don't cause
: everything after the first one to be ignored and not
: added to the url...
:
: Think I am a little over my head here, I am still
: new to this....

     You should consider using the CGI module. It handles
all this for you. The use of $form{tag} above, indicates
the use of cgi-lib.pl or a home-rolled form input
routine. While this is good for learning, it sucks for
creating real web apps. I f the book you are using to
learn from is not using CGI.pm, get another book. I
borrow mine from the public library before I buy them.


HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.

#4226 From: "James E Keenan" <jkeen@...>
Date: Sun Jul 1, 2001 3:29 pm
Subject: Re: Simple split() question
jkeen@...
Send Email Send Email
 
On Sat, 30 Jun 2001 sbasak@... wrote:
>>>
my $line from a file read is:
xyz abc 12sd "pqr stz" dfg (delimited by blank char).
I'm doing
my ($par1, $par2, $par3, $par4, $par5) = split(/ /, $line);
and I'm getting
$par4 = "pqr
$par5 = stz", which I don't want.

I want $par4 = "pqr stz", & $par5 = dfg
>>>

Assuming the character '_' does not occur within a string such as "pqr stz",
why not substitute '_' for ' ' first, do the split, then switch back to ' '?

my $line = '';
my @pars = ();

$line = 'xyz abc 12sd "pqr stz" dfg kfc non "test test1"';
$line =~ s|"(\w+) (\w+)"|"$1_$2"|g;

@pars = split(/ /, $line);
foreach (@pars) {
      $_ =~ s|"(\w+)_(\w+)"|"$1 $2"|g;
      print "$_\n";
}

Jim Keenan
jkeen@...
Brooklyn, NY

#4227 From: "Franki" <frankieh@...>
Date: Sun Jul 1, 2001 8:27 pm
Subject: Thankyou everyone...
frankieh@...
Send Email Send Email
 
Hi all,,

Just wanted to say thankyou to all of you for helping out,, I have learned
heaps from this list over the last year...

regex and learning the availability and use of various modules are the two
biggies I have still to learn properly...
(how do you guys know what modules to use for what? I always get quick
answers from this list with regard to modules,, so I am wondering where you
get your info,, It can't be CPAN as the layout of that site is not conducive
to quick searches...



Thanks heaps, its all working together nicely now...

one question I still have though..

In a NT/2000 server enviroment, I hate the fact that you can't require files
in different directories without specifying the path explicly ...  ie
$paTh="c:/inetpub/scripts/";

in linux/unix which is what I usually right for, you can use stuff like
./../somefile.pl in a require statement and it works just great... NT
doesn't like it at all and prints lots of lovely error messages to tell you
so...


So, my last question is this,,

if I do something like this:

my $PaTh="$ENV{'PATH_TRANSLATED'}";

that path would translate to something like "c:/inetpub/scripts/testfile.pl"

now if I used regex to remove the testfile.pl (or whatever file is after the
last /)

is it safe to use that resulting path as the path to require the other libs?
(with the relivent modifications to point to parent or child directories off
it??

is the $ENV{'PATH_TRANSLATED'} something that could be compromised and cause
the script to be insecure??

will it work with use strict or taint mode??

I want to give the windows users of this script, the same ease of install
that the linux one enjoys,, rather then have them have to work out what the
server path is and add a path statement to that effect at all of the script
files...


has anyone ever done anything like that?


kindest regards and thanks again..


Frank

#4228 From: "Brandon Brimberry" <brandon@...>
Date: Mon Jul 2, 2001 4:25 am
Subject: Hi I'm a newbie
brandon@...
Send Email Send Email
 
Hi I'm a newbie

Im using a classifieds scirpt on crawfordcountyclassifieds.com the original
scirpt is called 'dp market'
but the template file doesnt support ssi files. The banner rotation i am
using now is a simple javascipt.
can anyone help me. i want a perl perl script that will rotate ads to it
cant be ssi? the main reason i want sometthing like this is for stats.

thanks,

brandon

#4229 From: "Adrian Fischer" <adrian@...>
Date: Mon Jul 2, 2001 6:08 am
Subject: win32 mysql and perl = cant connect..STILL
adrian@...
Send Email Send Email
 
Hi Guys,

Ive been away for a while and was hoping htat everything would work by some
miracle when I got back but alas...it doesnt.

I have set up my pc with activestate perl, mysql, php and apache server.
All four work fine and perl and and apache work fine together as does php,
mysql and apache but I cant get perl and mysql to work together.  I can
access mysql ok and my php,mysql prog (using phpadmin) accesses the mysql db
that I want but not via perl.  Having said that..it doesnt throw and error
in cnnecting to the db ( I think) so perhaps its not what I think.

I get this error:
<snip>
Can't call method "prepare" on an undefined value at... (refering to the
'prepare' statement)
</snip>
when I run this bit of code:
<snip>
$db = &dbconnect;
$db_query = "SELECT rewardName,rewardCity,rewardRefers FROM tblReward WHERE
rewardRefers >=1 ORDER BY rewardRefers DESC";
  $dbh=$db->prepare($db_query);
$varReturnResult = $dbh->execute();
</snip>
using this connect string:
<snip>
####CONNECT
sub dbconnect {
  $db = DBI->connect($config{'connectstring'}, $config{'dbusername'},
$config{'dbpassword'});
         return $db;
</snip>

This same bit of code works fine on my www hosted site but not locally.  I
thought it may have been the connect string but Ive fiddled with that to no
avail.  Im stumped!!!

Any and all ideas would be appreciated

Thanks

Adrian Fischer

#4230 From: ykep@...
Date: Mon Jul 2, 2001 6:56 am
Subject: Parallel port, again
ykep@...
Send Email Send Email
 
--- In perl-beginner@y..., "Charles K. Clarkson" <c_clarkson@h...>
wrote:
>  <steve@b...>
> :
> : Surely our assembler program will compile under linux?
> :
> :
> : Steve
> : Webmaster/Programmer
> :
> :
> : ----- Original Message -----
> : From: <ykep@h...>
> : To: <perl-beginner@y...>
> : Sent: Saturday, June 30, 2001 7:18 AM
> : Subject: [PBML] Parallel port
> :
> :
> : > HI, everyone.
> : >
> : > I want to control parallel port, sending each data to
> : > datapin ( pin2-9 ) and reading from signal pin, i
> : > guess that's a 'raw' control, so how exactly do i
> : > do that with perl from linux ? I'm just recently
> : > learn perl, so could you give me an example.
> : > I can do that from windows/dos using assembler,
> : > but i really need to do that using perl, or is there
> : > a way to use assembler or c from perl ?
>
>     I think someone asked about serial ports a few months
> back and found a module on CPAN that did the trick. Have
> you tried: http://search.cpan.org/.
>
> HTH,
> Charles K. Clarkson
> Clarkson Energy Homes, Inc.

I've read about controlling serial port using perl, but i really have
to use parallel port, so unless that module can be used in parallel
port, i will need to ask for more help.

#4231 From: "Charles K. Clarkson" <c_clarkson@...>
Date: Mon Jul 2, 2001 7:18 am
Subject: Re: [PBML] Thankyou everyone...
c_clarkson@...
Send Email Send Email
 
Franki <frankieh@...>

: Hi all,,
:
: Just wanted to say thankyou to all of you for helping
: out,, I have learned heaps from this list over the
: last year...
:
: regex and learning the availability and use of various
: modules are the two biggies I have still to learn
: properly... (how do you guys know what modules to use
: for what? I always get quick answers from this list
: with regard to modules,, so I am wondering where you
: get your info,, It can't be CPAN as the layout of that
: site is not conducive to quick searches...

     I use http://search.cpan.org/ but you need to
look under the headings too. The search engine has
some bugs in it.

     Another great source is the comp.lang.perl.misc
USENET group. I search their archives first at
http://groups.google.com/. Don't ask questions there.
They are really unforgiving of newbies.

     I also spend some time at perlmonks
(http://www.perlmonks.org/). They have an experience
points system which has me hooked and encourages
participation and community. Try SuperSearch to search
there.

HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.

What if there were no hypothetical questions?

#4232 From: "Charles K. Clarkson" <c_clarkson@...>
Date: Mon Jul 2, 2001 8:11 am
Subject: Re: [PBML] Parallel port, again
c_clarkson@...
Send Email Send Email
 
<ykep@...>


: --- In perl-beginner@y..., "Charles K. Clarkson" <c_clarkson@h...>
: wrote:
: >  <steve@b...>
: > :
: > : Surely our assembler program will compile under linux?
: > :
: > :
: > : Steve
: > : Webmaster/Programmer
: > :
: > :
: > : ----- Original Message -----
: > : From: <ykep@h...>
: > : To: <perl-beginner@y...>
: > : Sent: Saturday, June 30, 2001 7:18 AM
: > : Subject: [PBML] Parallel port
: > :
: > :
: > : > HI, everyone.
: > : >
: > : > I want to control parallel port, sending each data to
: > : > datapin ( pin2-9 ) and reading from signal pin, i
: > : > guess that's a 'raw' control, so how exactly do i
: > : > do that with perl from linux ? I'm just recently
: > : > learn perl, so could you give me an example.
: > : > I can do that from windows/dos using assembler,
: > : > but i really need to do that using perl, or is there
: > : > a way to use assembler or c from perl ?
: >
: >     I think someone asked about serial ports a few months
: > back and found a module on CPAN that did the trick. Have
: > you tried: http://search.cpan.org/.
: >
: > HTH,
: > Charles K. Clarkson
: > Clarkson Energy Homes, Inc.
:
: I've read about controlling serial port using perl, but i really have
: to use parallel port, so unless that module can be used in parallel
: port, i will need to ask for more help.
:

     I did a pretty exhaustive search and couldn't find
anything about parallel ports under windows/dos. Looks
like you'll have to create the module yourself. The
inline modules http://search.cpan.org/search?dist=Inline
and XS allow you to use c with perl.

HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.

Is there another word for synonym?

#4233 From: "Adrian Fischer" <adrian@...>
Date: Mon Jul 2, 2001 8:56 am
Subject: Re: [PBML] win32 mysql and perl = cant connect..STILL
adrian@...
Send Email Send Email
 
Hi Guys..its me again,

Well what do you know... it was a problem my end all along (go figure).
Seems for some reason that I have to have the password variable empty in my
script to access the db on my local set up.  Not sure why?  Obviously I have
done something wrong when I set it up.  But at least now I can access and
develop it offline.  Hmm...how can I change my password to what it should be
will be my next little challenge.

Thanks anyway

Adrian Fischer
----- Original Message -----
From: "Adrian Fischer" <adrian@...>
To: <perl-beginner@yahoogroups.com>
Sent: Monday, July 02, 2001 4:08 PM
Subject: [PBML] win32 mysql and perl = cant connect..STILL


> Hi Guys,
>
> Ive been away for a while and was hoping htat everything would work by
some
> miracle when I got back but alas...it doesnt.
>
> I have set up my pc with activestate perl, mysql, php and apache server.
> All four work fine and perl and and apache work fine together as does php,
> mysql and apache but I cant get perl and mysql to work together.  I can
> access mysql ok and my php,mysql prog (using phpadmin) accesses the mysql
db
> that I want but not via perl.  Having said that..it doesnt throw and error
> in cnnecting to the db ( I think) so perhaps its not what I think.
>
> I get this error:
> <snip>
> Can't call method "prepare" on an undefined value at... (refering to the
> 'prepare' statement)
> </snip>
> when I run this bit of code:
> <snip>
> $db = &dbconnect;
> $db_query = "SELECT rewardName,rewardCity,rewardRefers FROM tblReward
WHERE
> rewardRefers >=1 ORDER BY rewardRefers DESC";
>  $dbh=$db->prepare($db_query);
> $varReturnResult = $dbh->execute();
> </snip>
> using this connect string:
> <snip>
> ####CONNECT
> sub dbconnect {
>  $db = DBI->connect($config{'connectstring'}, $config{'dbusername'},
> $config{'dbpassword'});
>         return $db;
> </snip>
>
> This same bit of code works fine on my www hosted site but not locally.  I
> thought it may have been the connect string but Ive fiddled with that to
no
> avail.  Im stumped!!!
>
> Any and all ideas would be appreciated
>
> Thanks
>
> Adrian Fischer
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

#4234 From: "Greg" <webmaster@...>
Date: Mon Jul 2, 2001 9:19 am
Subject: Re: does attachment work with sendmail
webmaster@...
Send Email Send Email
 
--- In perl-beginner@y..., erik.tank@b... wrote:
> I know that there is a way to do it, but you need to use MIME
standards.  I
> have never done it directly, but the MIME::Lite module from CPAN
does this.
====================================================
RFC1341

http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html

explains how to include mime types in e-mail and html pages.

Greg Smith
webmaster
www.bmw-club.org.uk
www.uksites4all.co.uk

#4235 From: "Will K." <opositive@...>
Date: Mon Jul 2, 2001 10:44 am
Subject: Simple Database for Email Addresses
opositive@...
Send Email Send Email
 
Greetings Folks,

Databasing newbie here... I've been trying to learn how to do data driven
sites without much luck, but I came up with a simple DB design idea that may
make the learning go better.

Can anyone tell me how to set up a simple, yet non-flat-file, database for
storing email addresses?

I was planning to use MySQL with Perl or PHP.  The table might be as simple
as a few columns for first/last names and email addresses.  If I can simply
get it so people can upload their email addresses to the DB from off of the
web (a far cry from scanning a db and manipulating data relationally), then
I think I should knock a big hole in my ignorance.

Any help much appreciated.

Thanks,

Will K.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

#4236 From: erik.tank@...
Date: Mon Jul 2, 2001 3:29 pm
Subject: RE: [PBML] Simple Database for Email Addresses
erik.tank@...
Send Email Send Email
 
Personally, MySQL is the way to go if you are creating a database.  You will
need to get MySQL (www.mysql.com) and from CPAN you will want to get the
DBI-1.18 and Msql-Mysql-modules-1.2216 modules.  This will allow you to
connect to the MySQL database from Perl.  Also good MySQL clients are
MySQL-Front (www.download.com) for windows or MysqlTool (www.icewalk.com)
for linux.  The clients make is really easy to create a database and tables.

Hope that helps,

Erik Tank
602-817-4705
erik.tank@...


-----Original Message-----
From: Will K. [mailto:opositive@...]
Sent: Monday, July 02, 2001 3:44 AM
To: sql-general@yahoogroups.com; perl-beginner@yahoogroups.com
Subject: [PBML] Simple Database for Email Addresses


Greetings Folks,

Databasing newbie here... I've been trying to learn how to do data driven
sites without much luck, but I came up with a simple DB design idea that may
make the learning go better.

Can anyone tell me how to set up a simple, yet non-flat-file, database for
storing email addresses?

I was planning to use MySQL with Perl or PHP.  The table might be as simple
as a few columns for first/last names and email addresses.  If I can simply
get it so people can upload their email addresses to the DB from off of the
web (a far cry from scanning a db and manipulating data relationally), then
I think I should knock a big hole in my ignorance.

Any help much appreciated.

Thanks,

Will K.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#4237 From: kwigint@...
Date: Mon Jul 2, 2001 6:46 pm
Subject: Using Inline in Perl
kwigint@...
Send Email Send Email
 
Using Inline in Perl
====================
The new Inline module for Perl allows you to write code in other
languages (like C, Python, Tcl, or Java), as well as toss it into
Perl scripts. Unlike previous ways of interfacing C code with Perl,
Inline is very easy to use, and very much in keeping with the Perl
philosophy. One extremely useful application of Inline is to write
quick wrapper code around a C-language library to use it from Perl.

http://www-106.ibm.com/developerworks/linux/library/l-inline?
open&l=734,t=grl,p=InlinePerl

#4238 From: "Adrian Fischer" <adrian@...>
Date: Mon Jul 2, 2001 8:51 pm
Subject: sendmail on windose
adrian@...
Send Email Send Email
 
Hi Gang,

  I have perl activestate installed on a windows box and an apache server. I
  also have mysql and php set up on the same box. It all works fine and my
  development turn around has improved heaps.

    Is there any way I can set up sendmail so I can simulate the sending of
  emails from my scripts.  Parts of the scripts send emails to confirm that
  things have been successful and I cant know that the script is working if I
  cant send emails to myself.  So it is almost crucial that I be able to do
  that.

  Please be gentle with me and take me by the hand to guide me as this is
  unfamiliar ground for me.

  TIA

  Adrian Fischer

#4239 From: "Wells, Doug" <doug_wells@...>
Date: Mon Jul 2, 2001 9:53 pm
Subject: RE: [PBML] sendmail on windose
doug_wells@...
Send Email Send Email
 
On Windows I use the free utility 'blat' to send email  (www.blat.com). It is easy to set up and works like a charm.
 
HTH.
Doug
-----Original Message-----
From: Adrian Fischer [mailto:adrian@...]
Sent: Monday, July 02, 2001 1:52 PM
To: perl-beginner@yahoogroups.com
Subject: [PBML] sendmail on windose

Hi Gang,

I have perl activestate installed on a windows box and an apache server. I
also have mysql and php set up on the same box. It all works fine and my
development turn around has improved heaps.

   Is there any way I can set up sendmail so I can simulate the sending of
emails from my scripts.  Parts of the scripts send emails to confirm that
things have been successful and I cant know that the script is working if I
cant send emails to myself.  So it is almost crucial that I be able to do
that.

Please be gentle with me and take me by the hand to guide me as this is
unfamiliar ground for me.

TIA

Adrian Fischer




Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

#4240 From: "Franki" <frankieh@...>
Date: Tue Jul 3, 2001 3:01 am
Subject: RE: [PBML] sendmail on windose
frankieh@...
Send Email Send Email
 
you might look into the sender.pm module as well,
 
it uses socket and I got it working when I was a complete newbie just by reading everything I found when I did a search for sender.pm in a search engine..
 
I added it to a shopping cart i had, and it has been used on a couple of NT and linux ISP servers now with no problems..
 
regards
 
Frank
-----Original Message-----
From: Wells, Doug [mailto:doug_wells@...]
Sent: Tuesday, 3 July 2001 5:53 AM
To: 'perl-beginner@yahoogroups.com'
Subject: RE: [PBML] sendmail on windose

On Windows I use the free utility 'blat' to send email  (www.blat.com). It is easy to set up and works like a charm.
 
HTH.
Doug
-----Original Message-----
From: Adrian Fischer [mailto:adrian@...]
Sent: Monday, July 02, 2001 1:52 PM
To: perl-beginner@yahoogroups.com
Subject: [PBML] sendmail on windose

Hi Gang,

I have perl activestate installed on a windows box and an apache server. I
also have mysql and php set up on the same box. It all works fine and my
development turn around has improved heaps.

   Is there any way I can set up sendmail so I can simulate the sending of
emails from my scripts.  Parts of the scripts send emails to confirm that
things have been successful and I cant know that the script is working if I
cant send emails to myself.  So it is almost crucial that I be able to do
that.

Please be gentle with me and take me by the hand to guide me as this is
unfamiliar ground for me.

TIA

Adrian Fischer




Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

#4241 From: Greg Matheson <lang@...>
Date: Tue Jul 3, 2001 8:26 am
Subject: ctags program for perl
lang@...
Send Email Send Email
 
Is there a program like ctags for perl, which allows you to jump
from file to file following subroutine definitions.

I was trying to get Darren Hiebert's ctags program going for
Unix, but reading the manual more carefully, it seems it's only
for C, Java, etc.

The two links in the vim help pages are dead or inaccessible. They
are/were:

http://fohnix.metronet.com/perlinfo/scripts/text-processing/newptags.pl
http://www.geek-girl.com/perl/coombs-scripts/ptags


--
Greg Matheson                    Rather than do things right,
Chinmin College,                 Do the right thing.
Taiwan

#4242 From: "Gordon Stewart" <gordonistewart_nz@...>
Date: Tue Jul 3, 2001 11:00 am
Subject: New Website...
gordonistewart_nz@...
Send Email Send Email
 
Hi there,

Right now - im designing (mainly for my own use) a website full of
Perl examples (fully-working examples - Not just part-codes like
other sites i see)

http://homepages.slingshot.co.nz/~gordon52/index.htm

Anyone have any good examples ?

First of, - im working on 'files' & 'text'

Eg - Renaming, Opening, Appending to files etc..

:- Searching text, Swapping text around, Sorting Arrays etc..

I'll add to it over time.

G.

#4243 From: "Chuck Roberts" <croberts@...>
Date: Tue Jul 3, 2001 12:54 pm
Subject: Sendmail on Windows
croberts@...
Send Email Send Email
 
Windows does not have sendmail, so you must use some other
command line utility to send email.

#4244 From: "Bill Lanier" <bilanier@...>
Date: Tue Jul 3, 2001 12:10 pm
Subject: Re: [PBML] Sendmail on Windows
bilanier@...
Send Email Send Email
 
You can purchase SendMail for windows... It's now called "IndigoMail".
Haven't tried it though...


>From: "Chuck Roberts" <croberts@...>
>Reply-To: perl-beginner@yahoogroups.com
>To: <perl-beginner@yahoogroups.com>
>Subject: [PBML] Sendmail on Windows
>Date: Tue, 3 Jul 2001 07:54:09 -0500
>
>Windows does not have sendmail, so you must use some other
>command line utility to send email.
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Messages 4215 - 4244 of 27464   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help