Re: Does the SWITCH statement have a default?

2005-01-20 Thread Josimar Nunes de Oliveira
Hello everybody, see the documentation at:
http://cpan.uwinnipeg.ca/htdocs/Switch/Switch.html
and try the example below:


use Switch;
$op = 1;
while ($op > 0){
chomp( $op =  );
switch ($op) {
case 1 { print "\n One" }
case 3 { print "\n Three" }
case 4 { print "\n Four" }
case 6 { print "\n Six" }
    else   { print "\nOthers" }
}
}


Josimar Nunes de Oliveira
SP/Brasil

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Perl Beginners List" 
Sent: Thursday, January 20, 2005 4:49 PM
Subject: Re: Does the SWITCH statement have a default?



>Is there a correct way to define a default case within a SWITCH? I tried
with
>the bottom case, but that errors with:
>Quantifier follows nothing before HERE mark in regex m/* << HERE / at
./ctest line 251.

>SWITCH:
>{
>   $field =~ /^CR\d{0,7}$/ && do
>{
>  $openCRs++;
>  print "$field";
>  last SWITCH;
>};
>   $field eq $engineer && do
>{
>  print "$field";
>  last SWITCH;
>};
>   $field =~ /*/ && do
>{
>  print "$field";
>  last SWITCH;
>};
>}
>
>I want to match anything else including an empty field with the last case.
Your help
>is greatly appreciated, thanks.

Not to confuse you, but there is no such thing as a SWITCH statment in
Perl.  Above you have defined a tag to name a block and then set up
conditions that if true, runs the code in the do block and exit the SWITCH:
block.  You could have substituted any tag for SWITCH, though SWITCH does
clarify what you're doing.

So any code you place after the last do block will execute if there is no
match.  Actually, to draw on your above style, I think '$field =~ /.*/'
should match on anything.

Enjoy,
Peter







** CONFIDENTIALITY NOTICE **
NOTICE:  This e-mail message and all attachments transmitted with it may
contain legally privileged and confidential information intended solely for
the use of the addressee.  If the reader of this message is not the intended
recipient, you are hereby notified that any reading,
dissemination, distribution, copying, or other use of this message or its
attachments is strictly prohibited.  If you have received this message in
error, please notify the sender immediately and delete this message from
your system.  Thank you..



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: Mime Lite attachments

2004-09-21 Thread Josimar Nunes de Oliveira
Hello everybody,

I have used something like this to send e-mail with three parts: one is an
html code that internally refers to other two files to compose the final
design. This code may be adaptable to other needs.

May be this help somebody.

Josimar Nunes de Oliveira


==

$msg = MIME::Lite->new(
   From => $from_id,
   To => $to_id,
   Cc => $cc_id,
   Subject => $subject_text,
   Type => 'multipart/related',
);

my $var = '
cid:InternalFileNameA.gif";>...

cid:InternalFileNameB.jpg";>

';

$msg->attach(
   Type => 'text/html',
   Data => $var
 );

$msg->attach(
   Type => 'image/gif',
   Id => 'InternalFileNameA.gif',
   Path => 'FileNameA.gif'
);

$msg->attach(
   Type => 'image/jpeg',
   Id => 'InternalFileNameB.jpg',
   Path => 'FileNameB.jpg'
);

==

- Original Message - 
From: "Wiggins d Anconia" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 10:33 AM
Subject: Re: Mime Lite attachments


>
> All,
>
> Was hoping for some advise b/c I cannot seem to get this to work.
> My problem is that it attaches the path name when I need to actual data
> attached.  So my goal is as if it would be
>
> cat test |uuencode test | mailx -s test [EMAIL PROTECTED]
>
> thanks,
>
> my $scratchtps = "/usr/local/log/filename";
>
> code snippet <
> there is a process that may/may not populate this file.
> >
>
>
>
> if ( -s $scratchtps ) {
> &mailme;

The above is usually better written as:

mailme();

> }
>
> sub mailme {
> my $msg = MIME::Lite->new(
> From=> 'EDM01 <[EMAIL PROTECTED]>',
> To  => 'Derek Smith <[EMAIL PROTECTED]>',
> Subject => "Return EDM Tapes",
> Type=> 'TEXT',
> Data => "$scratchtps",

'Data' is for the body, you need to either use the separate C
method, or provide the filename as the 'Path' argument.

You really should start reading the docs thoroughly, you have asked a
number of questions that are pretty simple if you just pay attention to
the API, and MIME::Lite has very thorough and simple documentation,

http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm#Create_a_simple_message_containing_just_an_image


> Disposition => 'attachment');
> $msg->send;
> }
>

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: Checking for Senders via POP3

2004-07-01 Thread Josimar Nunes de Oliveira
Yes, in the same way you get the data from "From: " header.

Josimar




- Original Message - 
From: "John" <[EMAIL PROTECTED]>
To: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Thursday, July 01, 2004 3:19 AM
Subject: Re: Checking for Senders via POP3


> I checked again the code and it worked well!!
>
> Now my question is if i can retreive the date that a message has been sent
> and the subject ,as well.
>
>
> Thanks again!
>
>
>
> - Original Message - 
> From: "Josimar Nunes de Oliveira" <[EMAIL PROTECTED]>
> To: "John" <[EMAIL PROTECTED]>; "Perl Beginners" <[EMAIL PROTECTED]>
> Sent: Wednesday, June 30, 2004 8:17 PM
> Subject: Re: Checking for Senders via POP3
>
>
> > Hello John,
> > Try the same script with a few modification.
> > Good luck,
> > Josimar
> >
> > 
> > use Net::POP3;
> >
> > #
> > #my $pop = Net::POP3->new($host) or die "Couldn't connect: $!";
> > #my $cnt;
> > #unless ( defined ( $cnt = $pop->login($user, $pw) ) ) {
> > # $pop->quit;
> > # die "Login error";
> > #}
> >
> > #here is the
> modification---
> > $host = 'yourmailserver.yourdomain';
> > $user = '[EMAIL PROTECTED]';
> > $pw   = 'yourpassword';
> > my $pop = Net::POP3->new($host, Timeout => 60) or die 'connect error';
> > $pop->user($user) or die 'login error';
> > my $cnt = $pop->pass($pw) or die 'authetication error';
> > #---
> >
> > if ($cnt > 0) {
> >  for my $num ( sort { $a <=> $b } keys %{ $pop->list } ) {
> >   print "Msg $num - ", grep /^From: /, @{ $pop->top($num) };
> >  }
> > } else {
> >  print "No messages\n";
> > }
> > $pop->quit;
> >
> > 
> >
> >
> > - Original Message - 
> > From: "John" <[EMAIL PROTECTED]>
> > To: "Perl Beginners" <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 30, 2004 12:13 PM
> > Subject: Re: Checking for Senders via POP3
> >
> >
> > > Your script doesn't get connect to anywhere. (netstat -a says nothing)
> > >
> > > I give the correct host , username, password and it doesn't work.
> > >
> > > Is the module broken? Net::POP3 (i use it on win32 active's
> distribution)
> > >
> > >
> > >
> > > - Original Message - 
> > > From: "Gunnar Hjalmarsson" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, June 30, 2004 5:55 PM
> > > Subject: Re: Checking for Senders via POP3
> > >
> > >
> > > > John wrote:
> > > > > I want to check for specific senders (in my inbox) connecting to
> > > > > the Mail Server via POP3.(just checking the From : bla bla string)
> > > > > Not to download the inbox mails to my system.
> > > >
> > > > This is one way:
> > > >
> > > >  use Net::POP3;
> > > >  my $pop = Net::POP3->new($host) or die "Couldn't connect: $!";
> > > >  my $cnt;
> > > >  unless ( defined ( $cnt = $pop->login($user, $pw) ) ) {
> > > >  $pop->quit;
> > > >  die "Login error";
> > > >  }
> > > >  if ($cnt > 0) {
> > > >  for my $num ( sort { $a <=> $b } keys %{ $pop->list } ) {
> > > >  print "Msg $num - ", grep /^From: /, @{
> $pop->top($num) };
> > > >  }
> > > >  } else {
> > > >  print "No messages\n";
> > > >  }
> > > >  $pop->quit;
> > > >
> > > > I for one did not receive the result of your efforts so far. Maybe
you
> > > > forgot to paste it into the message you sent...
> > > >
> > > > -- 
> > > > Gunnar Hjalmarsson
> > > > Email: http://www.gunnar.cc/cgi-bin/contact.pl
> > > >
> > > > -- 
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > <http://learn.perl.org/> <http://learn.perl.org/first-response>
> > > >
> > > >
> > >

Re: Checking for Senders via POP3

2004-06-30 Thread Josimar Nunes de Oliveira
Hello John,
Try the same script with a few modification.
Good luck,
Josimar


use Net::POP3;

#
#my $pop = Net::POP3->new($host) or die "Couldn't connect: $!";
#my $cnt;
#unless ( defined ( $cnt = $pop->login($user, $pw) ) ) {
# $pop->quit;
# die "Login error";
#}

#here is the modification---
$host = 'yourmailserver.yourdomain';
$user = '[EMAIL PROTECTED]';
$pw   = 'yourpassword';
my $pop = Net::POP3->new($host, Timeout => 60) or die 'connect error';
$pop->user($user) or die 'login error';
my $cnt = $pop->pass($pw) or die 'authetication error';
#---

if ($cnt > 0) {
 for my $num ( sort { $a <=> $b } keys %{ $pop->list } ) {
  print "Msg $num - ", grep /^From: /, @{ $pop->top($num) };
 }
} else {
 print "No messages\n";
}
$pop->quit;




- Original Message - 
From: "John" <[EMAIL PROTECTED]>
To: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Wednesday, June 30, 2004 12:13 PM
Subject: Re: Checking for Senders via POP3


> Your script doesn't get connect to anywhere. (netstat -a says nothing)
>
> I give the correct host , username, password and it doesn't work.
>
> Is the module broken? Net::POP3 (i use it on win32 active's distribution)
>
>
>
> - Original Message - 
> From: "Gunnar Hjalmarsson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 30, 2004 5:55 PM
> Subject: Re: Checking for Senders via POP3
>
>
> > John wrote:
> > > I want to check for specific senders (in my inbox) connecting to
> > > the Mail Server via POP3.(just checking the From : bla bla string)
> > > Not to download the inbox mails to my system.
> >
> > This is one way:
> >
> >  use Net::POP3;
> >  my $pop = Net::POP3->new($host) or die "Couldn't connect: $!";
> >  my $cnt;
> >  unless ( defined ( $cnt = $pop->login($user, $pw) ) ) {
> >  $pop->quit;
> >  die "Login error";
> >  }
> >  if ($cnt > 0) {
> >  for my $num ( sort { $a <=> $b } keys %{ $pop->list } ) {
> >  print "Msg $num - ", grep /^From: /, @{ $pop->top($num) };
> >  }
> >  } else {
> >  print "No messages\n";
> >  }
> >  $pop->quit;
> >
> > I for one did not receive the result of your efforts so far. Maybe you
> > forgot to paste it into the message you sent...
> >
> > -- 
> > Gunnar Hjalmarsson
> > Email: http://www.gunnar.cc/cgi-bin/contact.pl
> >
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >  
> >
> >
> >
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  
>
>
>
>

- Original Message - 
From: "John" <[EMAIL PROTECTED]>
To: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Wednesday, June 30, 2004 12:13 PM
Subject: Re: Checking for Senders via POP3


> Your script doesn't get connect to anywhere. (netstat -a says nothing)
>
> I give the correct host , username, password and it doesn't work.
>
> Is the module broken? Net::POP3 (i use it on win32 active's distribution)
>
>
>
> - Original Message - 
> From: "Gunnar Hjalmarsson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 30, 2004 5:55 PM
> Subject: Re: Checking for Senders via POP3
>
>
> > John wrote:
> > > I want to check for specific senders (in my inbox) connecting to
> > > the Mail Server via POP3.(just checking the From : bla bla string)
> > > Not to download the inbox mails to my system.
> >
> > This is one way:
> >
> >  use Net::POP3;
> >  my $pop = Net::POP3->new($host) or die "Couldn't connect: $!";
> >  my $cnt;
> >  unless ( defined ( $cnt = $pop->login($user, $pw) ) ) {
> >  $pop->quit;
> >  die "Login error";
> >  }
> >  if ($cnt > 0) {
> >  for my $num ( sort { $a <=> $b } keys %{ $pop->list } ) {
> >  print "Msg $num - ", grep /^From: /, @{ $pop->top($num) };
> >  }
> >  } else {
> >  print "No messages\n";
> >  }
> >  $pop->quit;
> >
> > I for one did not receive the result of your efforts so far. Maybe you
> > forgot to paste it into the message you sent...
> >
> > -- 
> > Gunnar Hjalmarsson
> > Email: http://www.gunnar.cc/cgi-bin/contact.pl
> >
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >  
> >
> >
> >
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  
>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: GD::Graph

2004-06-07 Thread Josimar Nunes de Oliveira
Dear Tarun,
I just can´t get it.
What may be wrong?


Microsoft Windows 2000 [Versão 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\Documents and Settings\Administrador>ppm install GD-Graph
Error: Package 'GD-Graph' not found. Please 'search' for it first.

C:\Documents and Settings\Administrador>



Thanks,
Josimar

- Original Message - 
From: "Tarun Dua" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 07, 2004 3:35 AM
Subject: Re: GD::Graph


> Josimar Nunes De Oliveira wrote:
> > Does GD::Graph module exist for windows platform?
> Yes
> > Where can I find it?
> ppm install GD-Graph
> -Tarun
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




GD::Graph

2004-06-06 Thread Josimar Nunes de Oliveira
Hello,
Does GD::Graph module exist for windows platform?
Where can I find it?
Thanks,
Josimar


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Fw: traps in perl

2004-03-17 Thread Josimar Nunes de Oliveira



To Jayakumar Rajagopal:

 What did you say in these "print"? Please, translate the messages and the
meaning of "$SIG":

> > > > $SIG{INT} = sub { print "tamizh vaazhga\n": };
> > > >
> > > > $SIG{USR1} = sub { print " vennai\n"; };
> > > >
> > > > $SIG{TSTP} = sub { print "poda maanga\n"; };


 Thanks,
 Josimar
[EMAIL PROTECTED]


> - Original Message - 
> From: "John W. Krahn" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 17, 2004 12:28 AM
> Subject: Re: traps in perl
>
>
> > Jayakumar Rajagopal wrote:
> > >
> > > From: John W. Krahn [mailto:[EMAIL PROTECTED]
> > >
> > > Jayakumar Rajagopal wrote:
> > > > $|=1;
> > > >
> > > > $SIG{INT} = sub { print "tamizh vaazhga\n": };
> > > >
> > > > $SIG{USR1} = sub { print " vennai\n"; };
> > > >
> > > > $SIG{TSTP} = sub { print "poda maanga\n"; };
> > > >
> > > > while(1)
> > > >
> > > > {
> > > >
> > > > print "...";
> > > >
> > > > `sleep 1`;
> > >
> > > Why are you running an external program to do something that perl
> > > provides a function for?
> > >
> > > perldoc -f sleep
> > >
> > > > }
> > > >
> > > > __END__;
> > >
> > > Sorry for using shell. I am good in shell,
> >
> > No need to apologize.  :-)
> >
> > > but do not know most  of
> > > perl. ( O Reilly says you can code perl very well if you know just
> > > 10% of it)
> >
> > Yes, Perl is good that way.
> >
> > > I am a poor person without perldoc.
> >
> > If you have Perl installed on your computer then you should have the
> > documentation installed as well.  If not and if you have web access you
> > can use http://perldoc.com/
> >
> > > Also I am new to perl.
> > > ;-(... Anyway I would try better.
> >
> >
> > John
> > -- 
> > use Perl;
> > program
> > fulfillment
> >
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >  
> >
> >
> >
> >
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Split question

2003-12-14 Thread Josimar Nunes de Oliveira
Try this:

@temp = split('\#', "abc#def#ghi#jkl") ;
foreach (@temp){
 print "\n", $_;
}

Josimar

- Original Message - 
From: "Perl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 14, 2003 3:16 AM
Subject: Split question


> Hi,
>i am new to Perl.
>here is my question 
> 
>   i have a character string like abc#def#ghi#jkl
> 
>   i want to split the string based on the delimiter # so that i get 
> something like this :
> 
>   abc  def  ghi jkl
> 
>   But
>   
>   @temp = split(/#/, "abc#def#ghi#jkl") ;
> 
> doesn't seem to work.
> 
> am i doing anything wrong here ?
> 
> thanks,
> S.
> 
> 
> 
> 
> 
> -
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Net::SMTP auth()

2003-10-29 Thread Josimar Nunes de Oliveira
The sequence is:

new()
auth()
mail()
to()
data()
datasend()
dataend()
quit()

Josimar


- Original Message - 
From: "Dan Muey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 28, 2003 6:33 PM
Subject: Net::SMTP auth()


Any one know at what point one needs to do auth() in a standard Net::SMTP
session?

 Do I do it first thing after new or ??

I'm currently doing:

new()
mail()
to()
data()
datasend()
quit()

So where do I put auth() in all that?

Thanks!

Dan

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: owner's name of a file

2003-10-01 Thread Josimar Nunes de Oliveira
Hi Michel,

Thanks for your help, but the code will run on windows2000server and the
mapped drive points to a folder on novell server.
The "getpwuid" is unimplemented in windows2000server perl.
I would like to take the file´s ownership related to novell server NDS
users.

Thanks again,

Josimar


- Original Message - 
From: "EUROSPACE SZARINDAR" <[EMAIL PROTECTED]>
To: "'Josimar Nunes de Oliveira'" <[EMAIL PROTECTED]>; "Perl
Beginners" <[EMAIL PROTECTED]>
Sent: Wednesday, October 01, 2003 9:01 AM
Subject: RE: owner's name of a file


Hi Josimar,

Have a look at perldoc -f stat and getpwuid.
You should afterwards transform the $uid into the literal name of the user
using /etc/passwd.


try :
$Uid = (stat('c:\Config.sys'))[4];
$UserName =  ( getpwuid( $Uid ))[0];



Michel

-Message d'origine-
De: Josimar Nunes de Oliveira [mailto:[EMAIL PROTECTED]
Date: lundi 22 septembre 2003 19:24
À: Perl Beginners
Objet: owner's name of a file


Hello,

How to get the owner's name of a file in a mapped drive from novell server?
My OS is W2K.

Thanks,


Josimar



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



owner's name of a file

2003-10-01 Thread Josimar Nunes de Oliveira
Hello,

How to get the owner's name of a file in a mapped drive from novell server?
My OS is W2K.

Thanks,


Josimar




Re: Trying to open a word document on the shell

2003-08-24 Thread Josimar Nunes de Oliveira
I made test wih the code below and it worked fine:

#!/usr/local/bin/perl -w
use Tk;
my $mw = new MainWindow();
my $filename=$mw->getOpenFile(-filetypes=>[['MS Word Document', '*.doc']]);
system("$filename");


Bye,

Josimar Nunes de Oliveira

- Original Message - 
From: "Michele Ouellet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 23, 2003 9:16 AM
Subject: Re: Trying to open a word document on the shell


> You need to supply the full path of your document, even though it may be
> sitting in the "current directory".
>
> Good luck,
>
> Michèle.
>
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I am trying to open a document as below
> >
> > #!/usr/local/bin/perl -w
> >
> >
> > use Tk;
> >
> >
> > my $mw = new MainWindow();
> >
> > my $filename=$mw->getOpenFile(-filetypes=>[['WinWord','winword.exe']]);
> >
> >
> > system("$filename john.doc");
> >
> >
> > But it says it cannot find the $filename path
> >
> > the $filename form is "C:/Program Files/Microsoft
> Office/Office/WINWORD.EXE"
> >
> > How can i overcome this problem?
> >
> >
> >
> >
>
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trying to open a word document on the shell

2003-08-24 Thread Josimar Nunes de Oliveira
I made test wih the code below and it worked fine:

#!/usr/local/bin/perl -w
use Tk;
my $mw = new MainWindow();
my $filename=$mw->getOpenFile(-filetypes=>[['MS Word Document', '*.doc']]);
system("$filename");


Bye,

Josimar Nunes de Oliveira

- Original Message - 
From: "Michele Ouellet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 23, 2003 9:16 AM
Subject: Re: Trying to open a word document on the shell


> You need to supply the full path of your document, even though it may be
> sitting in the "current directory".
>
> Good luck,
>
> Michèle.
>
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I am trying to open a document as below
> >
> > #!/usr/local/bin/perl -w
> >
> >
> > use Tk;
> >
> >
> > my $mw = new MainWindow();
> >
> > my $filename=$mw->getOpenFile(-filetypes=>[['WinWord','winword.exe']]);
> >
> >
> > system("$filename john.doc");
> >
> >
> > But it says it cannot find the $filename path
> >
> > the $filename form is "C:/Program Files/Microsoft
> Office/Office/WINWORD.EXE"
> >
> > How can i overcome this problem?
> >
> >
> >
> >
>
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Socket

2003-08-14 Thread Josimar Nunes de Oliveira

Try "Perl 5.8.0 Documentation: perlipc".
All you want to start socket is there.

Josimar


- Original Message - 
From: "awards" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 14, 2003 1:08 PM
Subject: Socket


> Hi,
> 
> 
> I would like to know if it is possible to transfer files from one computer
> to another using socket and Perl(obviously).
> And which module should I look at.
> Also is there any good site to teach socket??
> 
> Thank You.
> Anthony
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

Re: smtp problem

2003-08-14 Thread Josimar Nunes de Oliveira
Hi,

I was in trouble with Net::SMTP like you and discovered that the error was
in the sequence you submit the methods.
The right sequence that worked fine is to "authorize" as soon as you create
the new connection.


use Net::SMTP;
$smtp = Net::SMTP->new('yoursmtpmailserver.domain.com' );
$smtp->auth ( '[EMAIL PROTECTED]',  'password' );
$smtp->mail('[EMAIL PROTECTED]');
$smtp->to('[EMAIL PROTECTED]');
$smtp->data();
$smtp->datasend("To: [EMAIL PROTECTED]");
$smtp->datasend("\n");
$smtp->datasend("Your message comes here\n");
$smtp->dataend();
$smtp->quit;

Josimar Nunes de Oliveira


- Original Message - 
From: "George Schlossnagle" <[EMAIL PROTECTED]>
To: "awards" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, August 09, 2003 7:24 PM
Subject: Re: smtp problem


> Sounds like the server you are connecting to does not allow relaying.
> Is this a server you should be relaying mail through?
>
> George
>
> On Saturday, August 9, 2003, at 06:16  PM, awards wrote:
>
> > Hi,
> >
> > I found a strange problem.
> > like the subject says i'm using Net::SMTP
> > I don't have any error in my code.
> >
> > But when I'm using a server i.e mail.xxx.com
> > Only domain @xxx.com will receive an e-mail.
> > if I send an email at @aaa.com with the mail.xxx.com then it will not
> > get
> > the mail but if i change the server to aaa.com then i will get an
> > email at
> > @aaa.com but not @xxx.com.
> >
> > Here is the Code i'm using  to send mail
> >
> > $msg = MIME::Lite->new(
> > From => "$MailFrom",
> > To => "$MailTo",
> > Subject => "$Subject",
> > Type => 'text/html',
> > Data => "$Message"
> > );
> >
> > $str = $msg->as_string;
> > &die("Can't connect") unless $smtp = Net::SMTP->new($server);
> > $smtp->mail($MailFrom);
> > $smtp->to($MailTo);
> > $smtp->data();
> > $smtp->datasend("$str");
> > $smtp->dataend();
> > $smtp->quit();
> >
> >
> > awards
> >
> >
> >
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> -- George Schlossnagle
> -- Principal Consultant
> -- OmniTI Computer Consulting, Inc.
> -- +1.410.872.4910 x202
> -- 1024D/1100A5A0 1370 F70A 9365 96C9 2F5E  56C2 B2B9 262F 1100 A5A0
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Printing an Array

2003-07-30 Thread Josimar Nunes de Oliveira
Hi,
Pablo, you should write this at line of IF command:
if($count>0 && $count<$#archivo) {
I hope you get the right thing you want.
Bye,
Josimar


- Original Message - 
From: "Pablo Fischer" <[EMAIL PROTECTED]>
To: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 4:48 PM
Subject: Printing an Array


> Hi!
>
> I have an array (@archivo), and each line has pipes (|), so Im using
split,
> but Im using 'sleep 1' to make it 'slower' so I can see line by line.
>
> foreach $i (@archivo) {
> #Dont count the first and last line
> if($count>$size || $count<$size) {
> chomp($i);
> ($correo, $clave, $nombre, $registro, $id, $sexo, $password) = split(/\|/,
> $i);
> print $correo;
> sleep 1;
> }
> $count++;
> }
>
> However, it DOESNT print the array, it just waits.. (cause its no printing
> nothing). However I found that removing the sleep it prints, or after
print
> $correo add print " "; and it prints!
>
> Why sleep its ?")#$)"$ my foreach? :-(
>
> What it prints without sleep or with the other 'print' is:
>
> [EMAIL PROTECTED]@[EMAIL PROTECTED]@domain4.com
>
> and ...
>
> thanks!
> Pablo
> -- 
> Pablo Fischer Sandoval ([EMAIL PROTECTED])
> http://www.pablo.com.mx
> http://www.debianmexico.org
> GPG FingerTip: 3D49 4CB8 8951 F2CA 8131  AF7C D1B9 1FB9 6B11 810C
> Firma URL: http://www.pablo.com.mx/firmagpg.txt
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MD5 module

2003-06-25 Thread Josimar Nunes de Oliveira
Try

 http://archive.develooper.com/beginners%40perl.org/dateindex.html

Good luck!

Josimar

- Original Message - 
From: "mario kulka" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 4:36 PM
Subject: MD5 module


> Few days ago I sent a message about uploading modules but I just realized
I
> wasn't subscribed to the list. I just re-subscribed but I missed the
replys;
> is there a way to view the last messages posted to the list by date or
> something? or could someone just copy the reply to : "How to install MD5
> module to my hosting server" and re-send it to me?
>
> grately appreciated,
> Mariusz
>
> _
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Binary file conversion

2003-06-24 Thread Josimar Nunes de Oliveira
Hi all,

May be Cobol files (data and index files) too.

Josimar


- Original Message - 
From: "Ned Cunningham" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 24, 2003 1:45 PM
Subject: Binary file conversion


> HI all.
> 
> I have what appears to be a C++ file set (i.e. phone.dat, phone.idx).
> 
> My question is can Perl read these files and what modules do I need to do
> it.
> 
> Any starting help would be great.
> 
> Thankx
> 
> 
> Ned Cunningham
> POS Systems Developer
> Monro Muffler Brake & Service
> 200 Holleder Parkway
> Rochester, New York 14615
>  (585) 647-6400 ext 310
> [EMAIL PROTECTED]  
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: readir

2003-06-21 Thread Josimar Nunes de Oliveira
Hello Clarkson,
Thanks for everything you explained.

The 'System Volume Information' is a restricted system folder (only SYSTEM
can access) in NTFS.

For a moment I was in trouble in how to handle the @file resulted from the
File::Find.
It´s a basic problem that I need to understand how to access array and hash.
I must improve my skill toward this subject.
The final porpose isn´t important by now, only learning a litle more Perl:
I tried this and worked fine:

for (my $i=0; $i<=$#files; $i++){
 print "\n", $files[$i][0], ' => ', $files[$i][1];
}

How to sort the @file by filename (first column of array)?
How can take every occurrency of array with foreach(@files) or while(@files)
like in loop above?

Thanks again,

Josimar

- Original Message - 
From: "Charles K. Clarkson" <[EMAIL PROTECTED]>
To: "'Josimar Nunes de Oliveira'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Saturday, June 21, 2003 6:58 AM
Subject: RE: readir


> Josimar Nunes de Oliveira <[EMAIL PROTECTED]> wrote:
> :
> : My O.S. is w2k and I put the argument 'C:\\' to run;
>
> You don't have to use "C:\\". "C:/" is preferred.
>
>
> : then a message is
> : displayed:
> :
> : C:\Documents and Settings\Administrador\Desktop>perl filefind.pl
> : Can't opendir(c:\/System Volume Information): Invalid argument
> :  at filefind.pl line 7
> :
> : Why and how to bypass this situation?
>
> I'm using XP and don't have any trouble.
> Though scanning my C: would take an hour or
> so. What is "c:\/System Volume Information"?
> Is it a directory, file, or something else?
>
> Assuming line 7 is this, you may need a
> more robust "wanted" subroutine.
>
> find( sub{ push @files, [ $_, $File::Find::dir ] }, 'c://' );
>
> For instance, @files contains everything that
> Find::File may run into. It doesn't make a
> distinction as to what it is being added.
>
> This will only add files by testing with -f:
>
> find( sub{ push @files, [ $_, $File::Find::dir ] if -f }, 'c://' );
>
>
> : Other thing that seems to be basic in perl, but how
> : to print the list obtained from File::Find, like a
> : for/foreach/while?
>
> That depends on what you are trying to do.
> I know your making a list of files on your
> drive, but Explorer can give a more informative
> view than a text list. And it is faster than
> this method. Tell us what you need and we can
> help you sort it out (pun intended).
>
>
>
> HTH,
>
> Charles K. Clarkson
> -- 
> Head Bottle Washer,
> Clarkson Energy Homes, Inc.
> Mobile Home Specialists
> 254 968-8328
>
>
>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: readir

2003-06-20 Thread Josimar Nunes de Oliveira
My O.S. is w2k and I put the argument 'C:\\' to run; then a message is
displayed:

C:\Documents and Settings\Administrador\Desktop>perl filefind.pl
Can't opendir(c:\/System Volume Information): Invalid argument
 at filefind.pl line 7

Why and how to by pass this situation?

Other thing that seems to be basic in perl, but how to print the list
obtained from File::Find, like a for/foreach/while ?

Thanks,

Josimar

- Original Message - 
From: "Charles K. Clarkson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 11:45 PM
Subject: RE: readir


> Josimar Nunes de Oliveira <[EMAIL PROTECTED]> wrote:
>
> : use File::stat;
> :
> : listfiles( 'C:' );
> :
> : #
> : for($i=0;$i<$count;$i++){
> : print "\n", $allfiles[$i][0], ' => ', $allfiles[$i][1];
> : }
> : #
> :
> : sub listfiles{
> : my $folder = shift;
> : $folder .= '\\';
> : opendir ( my $media, $folder );
> : my @files = readdir( $media );
> : closedir( $media );
> : foreach (@files){
> : my $sb = stat($folder . $_);
> : ## mode 16895 or 16749 stands for subdirectory
> : if ($sb->mode == 16895 || $sb->mode == 16749){
> : if ($_ ne '.' and $_ ne '..'){
> : listfiles( $folder . $_ );
> : }
> : } else {
> : $allfiles[$count][0] = $_;
> : $allfiles[$count][1] = $folder;
> : $count++;
> : }
> : }
> : }
> :
>
>
> One reason File::Find was mentioned is that
> you can get the same thing with something like:
>
> use strict;
> use warnings;
>
> use File::Find;
>
> my @files;
> find( sub{ push @files, [ $_, $File::Find::dir ] }, 'c:/perl/bin/' );
>
>
> HTH,
>
> Charles K. Clarkson
> -- 
> Head Bottle Washer,
> Clarkson Energy Homes, Inc.
> Mobile Home Specialists
> 254 968-8328
>
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: readir

2003-06-20 Thread Josimar Nunes de Oliveira
Hi everybody,
How to sort the array of two columns by the first?
Would anybody enhance this code? Any sugestion?
Thanks,
Josimar


use File::stat;

listfiles( 'C:' );

#
for($i=0;$i<$count;$i++){
print "\n", $allfiles[$i][0], ' => ', $allfiles[$i][1];
}
#

sub listfiles{
my $folder = shift;
$folder .= '\\';
opendir ( my $media, $folder );
my @files = readdir( $media );
closedir( $media );
foreach (@files){
my $sb = stat($folder . $_);
## mode 16895 or 16749 stands for subdirectory
if ($sb->mode == 16895 || $sb->mode == 16749){
if ($_ ne '.' and $_ ne '..'){
listfiles( $folder . $_ );
}
} else {
$allfiles[$count][0] = $_;
$allfiles[$count][1] = $folder;
$count++;
}
}
}



- Original Message - 
From: "Ronen Kfir" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 19, 2003 5:08 PM
Subject: RE: readir


Hi,

This is not I was asking for!
I'll explain again:
1.  Find all the places where a one specific file (with same name), is shown
by read recursively all subdir of certain directory (it is a trigger file
for the rest of my program). What you wrote is only the top level of the
directory.
2. What I'm interested in are the paths of this file in the various
directories. I need to put each of those paths as a variable. (I think in
array/hash).
3. then I go to each path & from there pick up another file with same name
from all different paths, then my program will go on.

To make a long story short: I need the readdir switch (or anything else) for
digging into subdir, & a way to put the paths I find in array/hash.
Am I clear enough now?

P.S.
I work on Linux,




Ronen Kfir
System Administrator
T.A.U Computing Division
Tel: 972-3-6407416
Fax: 972-3-6405158
cellular: 972-55-405910
E-mail: [EMAIL PROTECTED]


-Original Message-
From: Josimar Nunes de Oliveira [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 6:21 PM
To: Ronen Kfir; [EMAIL PROTECTED]
Subject: Re: readir

Hi, try this sample code:

$dir = 'C:\\Folder\\.';

print "'\n", $dir;

opendir DIR, $dir or die "Cannot open $dir: $!";

foreach (@files=readdir DIR){
print '"\n", $_;
}


Good luck,

Josimar

- Original Message - 
From: "Ronen Kfir" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 19, 2003 5:18 AM
Subject: readir


Hi,
I want to use readdir to read a directory tree & find a certain file, which
might be present in many subdirectories (this file will be a trigger to
continue of the process). Then I want to define a few variables respectively
to the number of files found in readir that will define the path of those
files.  Then conditioned to each path the readdir found, pick up some other
file from that directory & attach it to a mail message.

The part of the attachment to a mail message I have. What I miss is all the
rest I have described.

Thank you

Ronen Kfir
System Administrator
T.A.U Computing Division
Tel: 972-3-6407416
Fax: 972-3-6405158
cellular: 972-55-405910
E-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: readir

2003-06-19 Thread Josimar Nunes de Oliveira
The '@files' gets  a list of files from 'readir $dir';
if you don´t need it, cut it out and make how you want.
Josimar


- Original Message ----- 
From: "Josimar Nunes de Oliveira" <[EMAIL PROTECTED]>
To: "Dan Muey" <[EMAIL PROTECTED]>; "Ronen Kfir"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, June 19, 2003 2:36 PM
Subject: Re: readir


> Yes, it works fine (theres´s one character ' in error when I wrote ""'\n",
> the correct is "\n").
> Try for yourself.
> Josimar
>
>
> - Original Message - 
> From: "Dan Muey" <[EMAIL PROTECTED]>
> To: "Josimar Nunes de Oliveira" <[EMAIL PROTECTED]>; "Ronen Kfir"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, June 19, 2003 12:24 PM
> Subject: RE: readir
>
>
> Just niticed a couple things, no biggie but:
>
> > Hi, try this sample code:
> >
> > $dir = 'C:\\Folder\\.';
> >
> > print "'\n", $dir;
>
> Do you mean print "\n" without the single quote next to the newline ?
>
> >
> > opendir DIR, $dir or die "Cannot open $dir: $!";
> >
> > foreach (@files=readdir DIR){
> What is @files for?
> Couldn't you just do:
> for(readdir DIR) { print "\n$_"; }
>
>
> > print '"\n", $_;
>
> Again the single quote, is that right?
> And I think you mean . Instead of , in that line to.
> Which actualy is unneccessary anyway (See example above).
>
> Just some thoughts..
>
> Dmuey
>
>
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: readir

2003-06-19 Thread Josimar Nunes de Oliveira
Yes, it works fine (theres´s one character ' in error when I wrote ""'\n",
the correct is "\n").
Try for yourself.
Josimar


- Original Message - 
From: "Dan Muey" <[EMAIL PROTECTED]>
To: "Josimar Nunes de Oliveira" <[EMAIL PROTECTED]>; "Ronen Kfir"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, June 19, 2003 12:24 PM
Subject: RE: readir


Just niticed a couple things, no biggie but:

> Hi, try this sample code:
>
> $dir = 'C:\\Folder\\.';
>
> print "'\n", $dir;

Do you mean print "\n" without the single quote next to the newline ?

>
> opendir DIR, $dir or die "Cannot open $dir: $!";
>
> foreach (@files=readdir DIR){
What is @files for?
Couldn't you just do:
for(readdir DIR) { print "\n$_"; }


> print '"\n", $_;

Again the single quote, is that right?
And I think you mean . Instead of , in that line to.
Which actualy is unneccessary anyway (See example above).

Just some thoughts..

Dmuey




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: readir

2003-06-19 Thread Josimar Nunes de Oliveira
Hi, try this sample code:

$dir = 'C:\\Folder\\.';

print "'\n", $dir;

opendir DIR, $dir or die "Cannot open $dir: $!";

foreach (@files=readdir DIR){
print '"\n", $_;
}


Good luck,

Josimar

- Original Message - 
From: "Ronen Kfir" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 19, 2003 5:18 AM
Subject: readir


Hi,
I want to use readdir to read a directory tree & find a certain file, which
might be present in many subdirectories (this file will be a trigger to
continue of the process). Then I want to define a few variables respectively
to the number of files found in readir that will define the path of those
files.  Then conditioned to each path the readdir found, pick up some other
file from that directory & attach it to a mail message.

The part of the attachment to a mail message I have. What I miss is all the
rest I have described.

Thank you

Ronen Kfir
System Administrator
T.A.U Computing Division
Tel: 972-3-6407416
Fax: 972-3-6405158
cellular: 972-55-405910
E-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HTML with in-line image and xml

2003-06-18 Thread Josimar Nunes de Oliveira
Hello everybody,
Please, could somebody help me to understand the reason the "xml" does not
act "in-line with html" like the "gif"?
The image.gif may be anything you have.
Thanks in advance,
Josimar

1) the code:

use MIME::Lite;
$msg = MIME::Lite->new(
To  =>'[EMAIL PROTECTED]',
Subject =>'HTML with in-line image and xml!',
Type=>'multipart/related'
);
$msg->attach(Type => 'text/html',
Id   => 'proposta.html',
Path => 'page.html',
);
$msg->attach(Type => 'image/gif',
Id   => 'image.gif',
Path => 'image.gif',
);
$msg->attach(Type => 'text/xml',
Id   => 'data.xml',
Path => 'data.xml',
);
$str = $msg->as_string;
print $str;


2) the page:



cid:data.xml";>
cid:image.gif";>










3) the data:


- 
- 
- 
  Empire Burlesque
  Bob Dylan
  USA
  Columbia
  10.90
  1985
  
- 
  Hide your heart
  Bonnie Tyler
  UK
  CBS Records
  9.90
  1988
  
- 
  Greatest Hits
  Dolly Parton
  USA
  RCA
  9.90
  1982
  
- 
  Still got the blues
  Gary Moore
  UK
  Virgin records
  10.20
  1990
  
- 
  Eros
  Eros Ramazzotti
  EU
  BMG
  9.90
  1997
  
- 
  One night only
  Bee Gees
  UK
  Polydor
  10.90
  1998
  
- 
  Sylvias Mother
  Dr.Hook
  UK
  CBS
  8.10
  1973
  
- 
  Maggie May
  Rod Stewart
  UK
  Pickwick
  8.50
  1990
  
- 
  Romanza
  Andrea Bocelli
  EU
  Polydor
  10.80
  1996
  
- 
  When a man loves a woman
  Percy Sledge
  USA
  Atlantic
  8.70
  1987
  
- 
  Black angel
  Savage Rose
  EU
  Mega
  10.90
  1995
  
- 
  1999 Grammy Nominees
  Many
  USA
  Grammy
  10.20
  1999
  
- 
  For the good times
  Kenny Rogers
  UK
  Mucik Master
  8.70
  1995
  
- 
  Big Willie style
  Will Smith
  USA
  Columbia
  9.90
  1997
  
- 
  Tupelo Honey
  Van Morrison
  UK
  Polydor
  8.20
  1971
  
- 
  Soulsville
  Jorn Hoel
  Norway
  WEA
  7.90
  1996
  
- 
  The very best of
  Cat Stevens
  UK
  Island
  8.90
  1990
  
- 
  Stop
  Sam Brown
  UK
  A and M
  8.90
  1988
  
- 
  Bridge of Spies
  T'Pau
  UK
  Siren
  7.90
  1987
  
- 
  Private Dancer
  Tina Turner
  UK
  Capitol
  8.90
  1983
  
- 
  Midt om natten
  Kim Larsen
  EU
  Medley
  7.80
  1983
  
- 
  Pavarotti Gala Concert
  Luciano Pavarotti
  UK
  DECCA
  9.90
  1991
  
- 
  The dock of the bay
  Otis Redding
  USA
  Atlantic
  7.90
  1987
  
- 
  Picture book
  Simply Red
  EU
  Elektra
  7.20
  1985
  
- 
  Red
  The Communards
  UK
  London
  7.80
  1987
  
- 
  Unchain my heart
  Joe Cocker
  USA
  EMI
  8.20
  1987
  
  





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



send e-mail with html integrated with xml (the html file missing)

2003-06-16 Thread Josimar Nunes de Oliveira
The html file wasn´t sent together and its content is:



















Thanks,

Josimar



send e-mail with html integrated with xml

2003-06-16 Thread Josimar Nunes de Oliveira



Hello everybody,
Although this problem seems to be related to 
"html" with "xml" and "e-mail",  I´d like to 
build a code to write and send an e-mail with two combined parts: html and 
xml.
My problem is to understand how to join the two 
files into one e-mail and the result must be visualized automatically integrated 
and not as just attachments.
I´m sending the two files html and xml as an 
example. If you save them and open the html file with a browser, you´ll 
see the data from xml integrated with the html lay-out.
Could somebody help me?
Thanks in advance,
Josimar
 
 

 
  Empire Burlesque 
  Bob Dylan 
  USA 
  Columbia 
  10.90 
  1985 
  
 
  Hide your heart 
  Bonnie Tyler 
  UK 
  CBS Records 
  9.90 
  1988 
  
 
  Greatest Hits 
  Dolly Parton 
  USA 
  RCA 
  9.90 
  1982 
  
 
  Still got the blues 
  Gary Moore 
  UK 
  Virgin records 
  10.20 
  1990 
  
 
  Eros 
  Eros Ramazzotti 
  EU 
  BMG 
  9.90 
  1997 
  
 
  One night only 
  Bee Gees 
  UK 
  Polydor 
  10.90 
  1998 
  
 
  Sylvias Mother 
  Dr.Hook 
  UK 
  CBS 
  8.10 
  1973 
  
 
  Maggie May 
  Rod Stewart 
  UK 
  Pickwick 
  8.50 
  1990 
  
 
  Romanza 
  Andrea Bocelli 
  EU 
  Polydor 
  10.80 
  1996 
  
 
  When a man loves a woman 
  Percy Sledge 
  USA 
  Atlantic 
  8.70 
  1987 
  
 
  Black angel 
  Savage Rose 
  EU 
  Mega 
  10.90 
  1995 
  
 
  1999 Grammy Nominees 
  Many 
  USA 
  Grammy 
  10.20 
  1999 
  
 
  For the good times 
  Kenny Rogers 
  UK 
  Mucik Master 
  8.70 
  1995 
  
 
  Big Willie style 
  Will Smith 
  USA 
  Columbia 
  9.90 
  1997 
  
 
  Tupelo Honey 
  Van Morrison 
  UK 
  Polydor 
  8.20 
  1971 
  
 
  Soulsville 
  Jorn Hoel 
  Norway 
  WEA 
  7.90 
  1996 
  
 
  The very best of 
  Cat Stevens 
  UK 
  Island 
  8.90 
  1990 
  
 
  Stop 
  Sam Brown 
  UK 
  A and M 
  8.90 
  1988 
  
 
  Bridge of Spies 
  T'Pau 
  UK 
  Siren 
  7.90 
  1987 
  
 
  Private Dancer 
  Tina Turner 
  UK 
  Capitol 
  8.90 
  1983 
  
 
  Midt om natten 
  Kim Larsen 
  EU 
  Medley 
  7.80 
  1983 
  
 
  Pavarotti Gala Concert 
  Luciano Pavarotti 
  UK 
  DECCA 
  9.90 
  1991 
  
 
  The dock of the bay 
  Otis Redding 
  USA 
  Atlantic 
  7.90 
  1987 
  
 
  Picture book 
  Simply Red 
  EU 
  Elektra 
  7.20 
  1985 
  
 
  Red 
  The Communards 
  UK 
  London 
  7.80 
  1987 
  
 
  Unchain my heart 
  Joe Cocker 
  USA 
  EMI 
  8.20 
  1987 
  


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: I need to make this not end

2003-06-15 Thread Josimar Nunes de Oliveira

A little fix: the line below must come before the "while()"

$im_thinking_of=int(rand 10);

> while(){
>   print "Pick a number:";
> $guess=;
> chomp $guess;
>  if ($guess>$im_thinking_of) {
>  print "You guessed too high!\n";
>   } elsif ($guess < $im_thinking_of) {
>   print "You guessed too low!\n";
>   } else {
>   print "You got it right!\n";
>   last;
>}
> 
> }
> 


Josimar


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Adding user to the system by using Perl?

2003-06-13 Thread Josimar Nunes de Oliveira
I get an error at line:
system("/usr/sbin/chpasswd $user:$password")==0 or die "Error: $?";
and I changed it to:
system("echo $user:$password | /usr/sbin/chpasswd")==0 or die "Error:
$?";
in such way it works fine.

Any comment?


- Original Message - 
From: "Janek Schleicher" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 23, 2003 12:51 AM
Subject: Re: Adding user to the system by using Perl?


> Puth Chan Choth wrote at Wed, 21 May 2003 18:01:24 +0700:
>
> > Do you mean that I write a script like this:
>
> Not definitly, but at least you better locate the error now ...
>
> > #!/usr/bin/perl
> > use strict;
> > use warnings;
> > use CGI::Carp 'fatalsToBrowser';
> > use CGI;
> > my $q = CGI->new();
> > my $user = $q->param('txtUserName') || 'No User Name Provided';
> > my $password = $q->param('txtPassword') || 'No Password Provided';
> > $user =~ /^\w+$/ or die "No valid user specified: $user";
> > $password =~ /^\S+$/ or die "No valid password specified: $password";
> > print
> >  $q->header(),
> >  $q->start_html( -title => 'User Administration For SuSE
Linux' ),
> >  $q->end_html;
> > system("/bin/mkdir -p /home/$user")==0 or die "Error:$?";
> > system("/usr/sbin/useradd -d /home/$user -s /bin/false $user")==0 or die
> > "Error:$?";
> > system("/bin/chown $user.users /home/$user -R")==0 or die "Error:$?";
> > system("/usr/sbin/chpasswd $user:$password")==0 or die "Error: $?";
> > print "Successfully added $user with password $password";
> >
> > Now I got the error on line 15.
>
> (That is the system("...mkdir...") ... line, isn't it)
>
> Seems like the script doesn't have the right to create a directory
> in the /home directory, what seems to be logical,
> as normal users (and cgi-scripts run normally not as root),
> normally don't have this right!
>
> > For me, I do not know so much about Perl regular expression. Would you
mind
> > telling me what these mean:
>
> Better you start also reading perldoc perlre.
> Programming in Perl without a basic knowledge of regular expressions is
> like driving a racing car only in the team's box.
> Not much better than Java, erm I meant a bicycle :-)
>
> > ~ /^\w+$/
>
> The ^ anchor stands for the beginning of the string,
> the $ for the end.
> Thus the string must look like \w+ from the beginning to the end.
> \w stands for a word character,
> +  stands for at least one without any boundary to the top how much.
> Conclusionary the regexp stands for
> a string consisting only of word characters (like a-zA-Z_)
>
> > ~ /^\S+$/
>
> Similar like above,
> \S stands for all non-white-space-characters.
> I wasn't sure what characters are useful for passwords and where exactly
> you would use them.
> (It's always dangerous to use them in a cmd line for many reasons,
>  so I supposed you wouldn't really want it)
>
> > $?
>
> Read perldoc perlvar.
> From it:
>$?  The status returned by the last pipe close,
>backtick (``) command, successful call to wait()
>or waitpid(), or from the system() operator.
>...
>... [and much more useful explications]
>
>
>
> Greetings,
> Janek
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: converting "strange" characters

2002-11-20 Thread Josimar Nunes de Oliveira
Dear Cordeiro,
I wrote some lines of code to produce a translation from <"portuguese"
character set> to <"regular" alpha char set>.
Does anybody has any idea to enhance this code or a perl module to replace
it?



%charset = (  "á"  => "a",
"Á"  => "A",
"ã"  => "a",
"Ã"  => "A",
"à"  => "a",
"À"  => "A",
"é"  => "e",
"É"  => "E",
"ê"  => "e",
"Ê"  => "E",
"í"  => "i",
"Í"  => "I",
"ó"  => "o",
"Ó"  => "O",
"ô"  => "o",
"Ô"  => "O",
"õ"  => "o",
"Õ"  => "O",
"ú"  => "u",
"Ú"  => "U",
"ü"  => "u",
"Ü"  => "U",
"ç"  => "c",
"Ç"  => "C",
" "  => "-",
"\-"  => "_",
"\+"  => "_"  );

$title = 'Serviço de Saúde áÁ ãà àÀ éÉ êÊ íÍ óÓ ôÔ õÕ úÚ üÜ çÇ +-';

for ($i=0;$i

I hope it help you.

Josimar Nunes de Oliveira



- Original Message -
From: "Duarte Cordeiro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 20, 2002 5:36 AM
Subject: converting "strange" characters


Hi,

As everyone, I have a bunch of "titles" to parse.
For each title I must create a directory with a similar name, and within
that directory a file called area.txt that has the title name inside.
No problem with that, but the directory names can't contain spaces, quote,
double quote... that part I already figured it out.
But my problem is within the "portuguese" character set.
So in a title like:

$title="Serviço de Saúde";
I need to create a:
Servico_de_Saude directory.

already tried:
$o=ord(substr($name,5,1);
$o becomes 231

$title=~s/\x{231}/c/g;
to see if I can get que ç to a c but no change takes place.

Is there a generic way of converting these characters to "regular" alpha?
and if not, how can I get a match on that specific character ?

Thanks in advance,

  Duarte Cordeiro


--
Duarte Manuel Cordeiro
Manager - IT - Security & Communications
mailto:[EMAIL PROTECTED] |  msn: [EMAIL PROTECTED] |
http://www.neoris.com/
--
Neoris Portugal
Edificio Inovação IV - Sala 819 - Taguspark * 2780-920 Oeiras * Portugal
Tel: +351 21 423-8350  |  Fax: +351 21 421-7626  | Mob: +35191 613-5706
--
Privileged/Confidential Information may be contained in this message. If you
are not the addressee indicated in this message (or responsible for delivery
of the message to such person), you may not copy or deliver this message to
anyone. In such case, you should destroy this message and kindly notify the
sender by reply email. Please advise immediately if you or your employer
does not consent to Internet email for messages of this kind. Opinions,
conclusions and other information in this message that do not relate to the
official business of my firm shall be understood as neither given nor
endorsed by it.






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




from DOS CHARACTER SET to ANSI CHARACTER SET

2002-11-15 Thread Josimar Nunes de Oliveira
Hello everybody,

Does someone know how to easily convert a file 
from DOS CHARACTER SET to ANSI CHARACTER SET?

A line, for example, from:

19/10/2002 03:06   757281 \Apresenta‡äes\Aquarium.zip

To:

19/10/2002 03:06   757281 \Apresentações\Aquarium.zip

Thanks in advance,

Josimar



Perl x RedHat 8.0 x Apache 2.0.40

2002-11-04 Thread Josimar Nunes de Oliveira
Hello everybody,

Please, does someone know how to fix this problem?
The server is RedHat 8.0 with Apache 2.0.40.
The same test was made on IIS 5.0 and no problem happened.

Thanks in advance,
Josimar





Server error!
The server encountered an internal error and was unable to complete your request. 
Error message: 
Premature end of script headers: teste.pl 
If you think this is a server error, please contact the webmaster 
Error 500
192.168.1.8 
Mon 04 Nov 2002 05:02:05 AM GMT-3 
Apache/2.0.40 (Red Hat Linux) 






#!/usr/bin/perl
print <
Test
test

EOHTML








Re: Comparing array elements with scalar variables.

2002-10-30 Thread Josimar Nunes de Oliveira
Try this code:

use Time::Local;
$date = time();
for ($i=0;$i<6;$i++){
   my $thisMonth = uc(substr(localtime($date - $i*(31 * 24 * 60 *
60)),4,3));
   print "$thisMonth\n";
}


Will this help you?

Josimar


- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 7:33 AM
Subject: Comparing array elements with scalar variables.


> I've have some code that prints a column of a database table into a html
> form.  The column of the table is just the last 6 months of the year:
>
> my @emonth;
> while ( @emonth = $end_Months->fetchrow_array()) {
>   print HTML "@emonth\n";
> }
>
> returns:
> MAY
> JUN
> JUL
> AUG
> SEP
> OCT
>
> i've got the current month stored in a scalar variable:
> my $thisMonth = (split ' ', uc localtime)[1];#equates to 'OCT'
>
> i want to print  month...ie.
> MAY
> JUN
> JUL
> AUG
> SEP
> OCT
>
> i've tried many ways of doing this and it seems that perl can't compare
> scalar variable with array elements, does anyone know of a way of doing
> this??
> any help would be much appreciated, cheers!
>
> Jonathan Musto
>
>
>
> BT Ignite Solutions
> Telephone - 0113 237 3277
> Fax - 0113 244 1413
> E-mail -   [EMAIL PROTECTED]
> http://www.technet.bt.com/sit/public

>
>
> British Telecommunications plc
> Registered office: 81 Newgate Street London EC1A 7AJ
> Registered in England no. 180
> This electronic message contains information from British
Telecommunications
> plc which may be privileged or  confidential. The information is intended
to
> be for the use of the individual(s) or entity named above. If you  are not
> the intended recipient be aware that any disclosure, copying, distribution
> or use of the contents of  this information is prohibited. If you have
> received this electronic message in error, please notify us by  telephone
or
> email (to the numbers or address above) immediately.
>
>
>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




application/x-www-urlform-encoded

2002-10-28 Thread Josimar Nunes de Oliveira
Hi,
Does anybody know how to encode data into
"application/x-www-urlform-encoded" format?
Thanks,
Josimar



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: generating a new web page

2002-10-16 Thread Josimar Nunes de Oliveira

Hi, Shane,
You should write a first html page with a form that use an action to a
script, like this:



Página Teste














The script "../scripts/test.pl" may have a content like this:

print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n";
print '';
print '';
print 'Processed';
print '';
print '';

 your business logic must be coded here, with some output
 if the user click on final button, the output should be produced by the
final fase that you have planned
 use the following piece of code to separate the input fields sent by the
form

@my_query_string = split(/&/,$ENV{'QUERY_STRING'});
foreach $index (0..$my_query_string){
 @col = split /=/, $my_query_string[$index];
print 'Field: ', $col[0], ' Value=', $col[1], '';
}


print '';
print '';




I hope it helps you.


Josimar



- Original Message -
From: "Shane Laffin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 17, 2002 1:01 AM
Subject: generating a new web page


> Hello All,
>
> This is my first web perl program.
>
> I want the user to select an option from a drop down menu, then click
> submit.
> The program should then go to a new web page to display the results.
>
> The below code displays all the info on the one page, how do I move to new
> web pages.
>
> I want to build the program up so that each new web page gathers more and
> more info from
> the user, then culminates in a final page that emulates the users
> selections.
>
> Any suggestions or pointers would be great.
>
> shane.
>
>
> #!perl.exe
>
> require DBI;
> use CGI;
> use strict;
>
> my $dbh = DBI->connect("DBI:mysql:database=golf;host=localhost");
> my $current_time = localtime;
>
> my $query = new CGI;
>
>
> &select_tournament();
> &show_result();
>
> sub select_tournament {
> print $query->header;
>
> print "\n\nGOLF Inc\n\n\n";
>
> print "Golfer Score Board\n";
> print "\n";
>
> print "Current Tournaments\n";
>
> my $sth = $dbh->prepare('SELECT cname, id FROM tournament');
> $sth->execute();
> my $row;
>
> print "\n";
> while ($row = $sth->fetchrow_arrayref()) {
>   print "$$row[0]\n";
> }
> print "";
>
> print "\n";
> print "\n";
> print "\n";
> print "\n";
> print "\n\n";
>
>  # Disconnect from the database.
>   $dbh->disconnect();
> }
>
> sub show_result {
>
> my $query = new CGI;
>
> print "\n\nGOLF Inc 2\n\n\n";
> print "\n";
> print "\n";
> print "Golf Tournament:\n";
>
> print "Selection: " . $query->param('tourn') . "\n";
>
> print "\n";
> print "\n\n";
>
> print "\n";
> }
>
>
> Thanks,
> shane..
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Perl and IIS 5.0

2002-10-16 Thread Josimar Nunes de Oliveira

Hello,
Does anybody know how to configure Microsoft IIS 5.0 (W2KProf) to run perl scripts?
Thanks,
Josimar




Re: Microsoft Access Question

2002-10-16 Thread Josimar Nunes de Oliveira

Take the following steps:

#
1) Install Modules DBI and ODBC:



Microsoft Windows 2000 [Versão 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

D:\Perl>ppm

PPM> install DBI

Install package 'DBI?' (y/N): y

Installing package 'DBI'...
Bytes transferred: 368671
Installing D:\Perl\site\lib\auto\DBI\dbd_xsh.h
Installing D:\Perl\site\lib\auto\DBI\DBI.bs
etc...
Installing D:\Perl\bin\dbish
Installing D:\Perl\bin\dbish.bat
Writing D:\Perl\site\lib\auto\DBI\.packlist

PPM> install DBD-ODBC

Install package 'DBD-ODBC?' (y/N): Y

Installing package 'DBD-ODBC'...
Bytes transferred: 35966
Installing D:\Perl\site\lib\auto\DBD\ODBC\ODBC.bs
Installing D:\Perl\site\lib\auto\DBD\ODBC\ODBC.dll
Installing D:\Perl\site\lib\auto\DBD\ODBC\ODBC.exp
Installing D:\Perl\site\lib\auto\DBD\ODBC\ODBC.lib
Installing D:\Perl\html\site\lib\DBD\ODBC.html
Installing D:\Perl\site\lib\DBD\ODBC.pm
Writing D:\Perl\site\lib\auto\DBD\ODBC\.packlist
PPM> QUIT
Quit!

D:\Perl>





2) Configure a System DSN for the file to be accessed via ODBC DataSource
(Control Panel / Administrative Tools), like this:

name = Agenda
drive = MS Access (*.mdb)
file = C:\Agenda.mdb   (drive:\fullpath\filename.mdb)


#
3) Try this code example:



use DBI;

$dbh = DBI->connect( "dbi:ODBC:Agenda", "", "",
   {RaiseError => 1, PrintError => 1, AutoCommit => 1} ) or
   die "Unable to connect: " . $DBI::errstr . "\n";

$sel = $dbh->prepare( "select name, phone, city, country from phonebook
where city = ? and country = ? order by name" );
@col = ( 'Sao Paulo', 'Brazil' );
$sel->execute( @col );

while( @col = $sel->fetchrow_array ){
 $name = $col[0];
 $phone = $col[1];
 $city = $col[2];
 $country = $col[3];
 printf "\n\n\rName___: \t%s \n\rPhone__: \t%s \n\rCity___: \t%s
\n\rCountry: \t%s",
   $name, $phone, $city, $country;
}

$sel->finish;
$dbh->disconnect;




The SQL statement applied in "$dbh->prepare( ... )" may be a select, insert,
update, delete.

I hope it helps you.

Josimar Nunes de Oliveira
[EMAIL PROTECTED]





- Original Message -
From: "Cleiton L. Siqueira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 16, 2002 6:02 PM
Subject: Microsoft Access Question


> Dear,
>
> I need to retrieve data from Microsoft Access database and put them in a
PostgreSQL database.
> I got to access PostgreSQL normally, but I can't open a Microsoft Access
database using perl.
> Someone knows how can I do it?
>
> Thanks!
>
>
> Cleiton L. Siqueira
> Colégio Monjolo
> [EMAIL PROTECTED]
> (0xx45) 520-1915
>
> Esta mensagem foi enviada pelo sistema MONJOLO WEBMAIL
>
> http://www.colegiomonjolo.com.br
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Using Perl to write to an Access 97 database (*.mdb)

2002-10-11 Thread Josimar Nunes de Oliveira
I´m a beginner with perl and I need to find the DBI.pm module for Win32.
Does anybody know where I could find it?


use DBI;
@driver_names = DBI->available_drivers;
@data_sources = DBI->data_sources($driver_name, \%attr);
$i=0;
foreach (@driver_names){print i++, ' ', $_, "\n";}
$i=0;
foreach (@data_sources){print i++, ' ', $_, "\n";}




Microsoft Windows 2000 [Versão 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

F:\Internet Tutorial\Perl>perl dbi.pl
Can't locate DBI.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .)
at d
bi.pl line 1.
BEGIN failed--compilation aborted at dbi.pl line 1.

F:\Internet Tutorial\Perl>





Thanks in advance,

Josimar Nunes de Oliveira




- Original Message -
From: comunic@
To: Undisclosed-Recipient:;
Sent: Friday, October 11, 2002 5:26 PM
Subject: CEFET-SP / Concurso Público para Docentes


- Original Message -
From: "Hanson, Rob" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, October 11, 2002 4:36 PM
Subject: RE: Using Perl to write to an Access 97 database (*.mdb)


> I would use withe DBD::ODBC (with DBI), or Win32::OLE (with ADO).
>
> That assumes that you have worked with either DBI or Microsoft's ADO.
> You could also use Win32::OLE to directly access the Access API, but I
> have no experience with that.
>
> Rob
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:shawn_milochik@;godivachoc.com]
> Sent: Friday, October 11, 2002 3:20 PM
> To: [EMAIL PROTECTED]
> Subject: Using Perl to write to an Access 97 database (*.mdb)
>
>
> Is there a module for this?  I have some comma-separated files I need to
> input to an Access 97 format mdb.  I do not need to define any tables or
> anything -- just pump data into an existing structure.
>
> Thank you,
> Shawn
>
>
>
>
>
> **
> This e-mail and any files transmitted with it may contain
> confidential information and is intended solely for use by
> the individual to whom it is addressed.  If you received
> this e-mail in error, please notify the sender, do not
> disclose its contents to others and delete it from your
> system.
>
> **
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Quick ?

2002-09-30 Thread Josimar Nunes de Oliveira

It´s represent "not"; 0 represents FALSE; and not 0 represents TRUE;

$quit = 0;
while ( ! $quit ){# means "while not 0", that means "while not
false", that means "while true"
any statement;
}

Try this test:

#BEGIN OF CODE

$count = 10;
$quit = 0;
while (! $quit)  {# "not 0" represents "not false" or just
"true", making the "while loop" to be active
print $count, "\n";
$count--;
if ( $count == 0 ) {
$quit = 1;# "not 1" represents "not true" or just
"false", making the "while loop" to stop
}
}
print 'Press ENTER to quit', "\n";
$etc = ;

#END OF CODE


Josimar


- Original Message -
From: "Grant Hansen" <[EMAIL PROTECTED]>
To: "Perl Beginners" <[EMAIL PROTECTED]>
Sent: Saturday, September 28, 2002 12:26 AM
Subject: Quick ?


What is the ! doing in this statement?

$quit = 0;
while (! $quit)

Thanks

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]