Re: info pls

2005-11-11 Thread Chris Devers
On Sat, 12 Nov 2005, Ssavitha wrote:

> [Please] let me know the connection string in perl script to connect 
> to SQL server.

'Please' let us know if you searched CPAN first. 

If you had, you would have seen the answer, along with a nice long 
useful description, at the top of

http://search.cpan.org/dist/DBD-ODBC/ODBC.pm

This uses Perl's DBI module's DBD::ODBC driver to establish an ODBC 
connection to the database server of your choice. 



-- 
Chris Devers

3žå†ÄY÷S³c¡
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


info pls

2005-11-11 Thread Ssavitha

Hi,



Pls. let me know the connection string in perl script to connect to SQL server.



regards,

savitha.


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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




RE: Need permissions to rename file on Windows XP

2005-11-11 Thread Katherine Richmond
Thank you for replying. It is a log file that I can write to from both Perl and
VB.NET. But for some reason, I am not able to rename it. My plan is to move it
to a log archive directory (which works) and then rename it by adding the date
to the name. 

Thanks,
Kathy


--- "Cintron, Jose J." wrote:
Do you have permissions to modify this file.  If you don't there's not
much you can do.


+--
| Jos$E9 J. Cintr$F3n 
+-- 

> -Original Message-
> From: kathyjjja [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 11, 2005 10:03
> To: beginners@perl.org
> Subject: Need permissions to rename file on Windows XP
> 
> Hello everyone,
>  
> I am trying to rename a file like this:
>  
> rename($myFile, $newName);
>  
> The program dies there and says "Permission Denied."
>  
> What can I do in order to rename that file?
>  
> Thanks,
> Kathy
> 
>   

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




Re: having problems with index of a date string

2005-11-11 Thread Stephen Mayer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kathy,

 I'm not sure exactly what problem you are having.  When I ran your code below 
(after putting a
semi-colon after `my $where`), I got the result of `where = 4` which is the 
index of the letter N in
the $dateTime string.  What is it you are expecting to see?

Steve

kathyjjja wrote:
> Hello everyone,
>  
> I am trying to add the date to a file name. I finally got rename to work, but 
> now I am having problems with indexing the date string. Index works fine on 
> any other string, but for some reason it is not seeing the characters in 
> date. Here is the code:
>  
> my $where
> my $dateTime = localtime;
> print "dateTime = $dateTime\n";
> # dateTime looks like this:  Fri Nov 11 14:59:49 2005
> $where= index($dateTime, "N");
> print "where = $where\n";
>  
> index() cannot find anything in the $dateTime string. I am thinking that this 
> data is actually stored in another format and when you ask for it to be 
> printed, it formats it nicely for you automatically. If that is true, how can 
> I get a date as a string that I can manipulate?
>  
> Thanks,
> Kathy
> 
>   
> -
>  Yahoo! FareChase - Search multiple travel sites in one click.  

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDdPy7C4cakfkZLXQRAn6jAJwN1sAzhJWyjOA5nWCMo2r7B39vdQCdEynO
P4hPaK2WUkdKCYRW+vdHNws=
=ni5O
-END PGP SIGNATURE-

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




Re: having problems with index of a date string

2005-11-11 Thread kathyjjja
It certainly must be Friday. I have this working now. Sorry. 

kathyjjja <[EMAIL PROTECTED]> wrote:Hello everyone,

I am trying to add the date to a file name. I finally got rename to work, but 
now I am having problems with indexing the date string. Index works fine on any 
other string, but for some reason it is not seeing the characters in date. Here 
is the code:

my $where
my $dateTime = localtime;
print "dateTime = $dateTime\n";
# dateTime looks like this: Fri Nov 11 14:59:49 2005
$where= index($dateTime, "N");
print "where = $where\n";

index() cannot find anything in the $dateTime string. I am thinking that this 
data is actually stored in another format and when you ask for it to be 
printed, it formats it nicely for you automatically. If that is true, how can I 
get a date as a string that I can manipulate?

Thanks,
Kathy


-
Yahoo! FareChase - Search multiple travel sites in one click. 


-
 Yahoo! FareChase - Search multiple travel sites in one click.  

having problems with index of a date string

2005-11-11 Thread kathyjjja
Hello everyone,
 
I am trying to add the date to a file name. I finally got rename to work, but 
now I am having problems with indexing the date string. Index works fine on any 
other string, but for some reason it is not seeing the characters in date. Here 
is the code:
 
my $where
my $dateTime = localtime;
print "dateTime = $dateTime\n";
# dateTime looks like this:  Fri Nov 11 14:59:49 2005
$where= index($dateTime, "N");
print "where = $where\n";
 
index() cannot find anything in the $dateTime string. I am thinking that this 
data is actually stored in another format and when you ask for it to be 
printed, it formats it nicely for you automatically. If that is true, how can I 
get a date as a string that I can manipulate?
 
Thanks,
Kathy


-
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: combining array ref's

2005-11-11 Thread Mike Blezien
Thanks John, this helps get me in the right direction of what I'm trying to 
accomplish :)


Mickalo

John W. Krahn wrote:

Mike Blezien wrote:


Hello,



Hello,



what is the most effecient way to combine multiple array refs into one
array ref, IE:

my $arrayrefA = ['1',2','3'];
my $arrayrefB = ['4','5','6'];
my $arrayrefC = ['7','8','9'];

my $allarrayref = (Combine $arrayrefA $arrayrefB $arrayrefC)



So you just want to combine the contents of the anonymous arrays?

my $allarrayref = [ @$arrayrefA, @$arrayrefB, @$arrayrefC ];


John



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




Re: help with matching

2005-11-11 Thread Jay Savage
On 11/11/05, Dr.Ruud <[EMAIL PROTECTED]> wrote:
> Jay Savage:
>
> > $user = chomp($_);
>
> No, see `perldoc -f chomp`.
>
>   chomp;
>   $user = $_;
>

good catch.  Meant to write

   chomp($user = $_);

Long day...

-- j
--
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.dpguru.com  http://www.engatiki.org

values of β will give rise to dom!


Re: help with matching

2005-11-11 Thread Dr.Ruud
Jay Savage:

> $user = chomp($_);

No, see `perldoc -f chomp`.

  chomp;
  $user = $_;

-- 
Affijn, Ruud

"Gewoon is een tijger."


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




Re: combining array ref's

2005-11-11 Thread John W. Krahn
Mike Blezien wrote:
> Hello,

Hello,

> what is the most effecient way to combine multiple array refs into one
> array ref, IE:
> 
> my $arrayrefA = ['1',2','3'];
> my $arrayrefB = ['4','5','6'];
> my $arrayrefC = ['7','8','9'];
> 
> my $allarrayref = (Combine $arrayrefA $arrayrefB $arrayrefC)

So you just want to combine the contents of the anonymous arrays?

my $allarrayref = [ @$arrayrefA, @$arrayrefB, @$arrayrefC ];


John
-- 
use Perl;
program
fulfillment

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




combining array ref's

2005-11-11 Thread Mike Blezien

Hello,

what is the most effecient way to combine multiple array refs into one array 
ref, IE:


my $arrayrefA = ['1',2','3'];
my $arrayrefB = ['4','5','6'];
my $arrayrefC = ['7','8','9'];

my $allarrayref = (Combine $arrayrefA $arrayrefB $arrayrefC)

TIA,

Mickalo



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




variable assignment

2005-11-11 Thread Charles (Chuck) Mattice

Hi All,

I'm new to the list and know more php than perl. I can read perl and 
understand some of it. One problem I seem to be facing is variable 
assignment and keeping the variables from script to script. In php this 
is fairly easy by assigning the global to the variable.


I'm not sure how to do this in perl

I have a affiliate program I am working with that I would like to make 
some changes to and correct a couple of bugs in


The program uses

use CGI qw (:standard);
$q = new CGI;

in every script

it also has

$referer = $q->referer();

in all the scripts

the $referer variable is the one that I think is causing me the problem.

To explain my situation as to execution the perl and html pages go like this

a cookie is set by a script with the affiliate ID. If the person who 
clicked the link has cookies enabled on their browser a cookie is set 
with the affiliate information. upon clicking the order it pulls cookie 
info if present or searches for a IP in the database if not (although 
this is commented out on purpose) the order page is a html form and the 
information then is transported to a different set of perl scripts to 
inform us of a order and it's details, then it pop up another html page 
to take the person to either paypal or our merchant processor. On 
completion they are returned to a cgi script where the commission is 
processed.


This is where we loose the $referer variable I think, maybe we've lost 
it earlier in the process. Can anyone point me to the docs that cover 
this or explain to this newbie how variables are kept and transfered 
between scripts especially if there are at least 2 or 3 html pages 
between the scripts. I thought about the HTML POST variables but don't 
think that it would still be present from one page to another to 
merchant processor and back.


Any help appreciated.

Thanks,

Charles Mattice

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




RE: Need permissions to rename file on Windows XP - SOLVED

2005-11-11 Thread kathyjjja
It turns out there were illegal characters in the new file name. Before I 
append the date onto the file name, I need to clean it up a bit. Thanks for the 
help, everyone.
 
Kathy

"Cintron, Jose J." <[EMAIL PROTECTED]> wrote:
If you can write to the file make sure that it's not in use by some
other process.


+--
| José J. Cintrón 
+-- 

> -Original Message-
> From: Katherine Richmond [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 11, 2005 10:14
> To: Cintron, Jose J.; "kathyjjja"; beginners@perl.org
> Subject: RE: Need permissions to rename file on Windows XP
> 
> Thank you for replying. It is a log file that I can write to 
> from both Perl and VB.NET. But for some reason, I am not able 
> to rename it. My plan is to move it to a log archive 
> directory (which works) and then rename it by adding the date 
> to the name. 
> 
> Thanks,
> Kathy
> 
> 
> --- "Cintron, Jose J." wrote:
> Do you have permissions to modify this file. If you don't 
> there's not much you can do.
> 
> 
> +--
> | Jos$E9 J. Cintr$F3n
> +--
> 
> > -Original Message-
> > From: kathyjjja [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, November 11, 2005 10:03
> > To: beginners@perl.org
> > Subject: Need permissions to rename file on Windows XP
> > 
> > Hello everyone,
> > 
> > I am trying to rename a file like this:
> > 
> > rename($myFile, $newName);
> > 
> > The program dies there and says "Permission Denied."
> > 
> > What can I do in order to rename that file?
> > 
> > Thanks,
> > Kathy
> > 
> > 
> 

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





-
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: Windows XP Pro vs Windows 2000

2005-11-11 Thread Walter A Poor Jr
- Message from "Bakken, Luke" <[EMAIL PROTECTED]> on Thu, 10 
Nov 2005 17:24:52 -0500 -
To:
"Walter A Poor Jr" <[EMAIL PROTECTED]>, 
Subject:
RE: Windows XP Pro vs Windows 2000
>Walter A Poor Jr wrote:
> > We have been using perl (ActiveState 5.8.6) on Windows 2000 PCs for a
> > year 
> >
> > 
> >
> > Any ideas on why "rename" now fails, and on how to fix the problem?  I
> > have already reinstalled perl, but that did not help.
> >
> > Thanks,
> > Walt Poor

> This could be a problem with the permissions of the parent folder to the
> ones you are moving from and creating. Does it propagate the permissions
> properly?
>
> Luke

Problem solved:  Luke asked a sequence of questions after the one shown 
above,
and one of them eventually led me to the critical experiment.  To save 
bandwidth, I will not go into the details here, but will provide them to 
anyone who sends me a note indicating interest.

Thanks,
Walt Poor


RE: Need permissions to rename file on Windows XP

2005-11-11 Thread Cintron, Jose J.
If you can write to the file make sure that it's not in use by some
other process.


+--
| José J. Cintrón 
+-- 

> -Original Message-
> From: Katherine Richmond [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 11, 2005 10:14
> To: Cintron, Jose J.; "kathyjjja"; beginners@perl.org
> Subject: RE: Need permissions to rename file on Windows XP
> 
> Thank you for replying. It is a log file that I can write to 
> from both Perl and VB.NET. But for some reason, I am not able 
> to rename it. My plan is to move it to a log archive 
> directory (which works) and then rename it by adding the date 
> to the name. 
> 
> Thanks,
> Kathy
> 
> 
> --- "Cintron, Jose J." wrote:
> Do you have permissions to modify this file.  If you don't 
> there's not much you can do.
> 
> 
> +--
> | Jos$E9 J. Cintr$F3n
> +--
> 
> > -Original Message-
> > From: kathyjjja [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, November 11, 2005 10:03
> > To: beginners@perl.org
> > Subject: Need permissions to rename file on Windows XP
> > 
> > Hello everyone,
> >  
> > I am trying to rename a file like this:
> >  
> > rename($myFile, $newName);
> >  
> > The program dies there and says "Permission Denied."
> >  
> > What can I do in order to rename that file?
> >  
> > Thanks,
> > Kathy
> > 
> > 
> 

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




Re: Need permissions to rename file on Windows XP

2005-11-11 Thread Dermot Paikkos
On 11 Nov 2005 at 7:02, kathyjjja wrote:

> Hello everyone,
>  
> I am trying to rename a file like this:
>  
> rename($myFile, $newName);
>  
> The program dies there and says "Permission Denied."
>  
> What can I do in order to rename that file?


Not much if you don't own the file, have sufficient rights to rename 
it or if the file is in use by another program.

I am not sure why it is dying as you haven't said 

rename($myFile,$newName) or die: $!\n";

you could 

rename($myFile,$newName) or warn "can't rename $myFile: $!\n";

and it would report the error and continue. 

I suspect you need to login as administrator and run this script 
again.

HTH.
Dp.


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




RE: Need permissions to rename file on Windows XP

2005-11-11 Thread Cintron, Jose J.
Do you have permissions to modify this file.  If you don't there's not
much you can do.


+--
| José J. Cintrón 
+-- 

> -Original Message-
> From: kathyjjja [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 11, 2005 10:03
> To: beginners@perl.org
> Subject: Need permissions to rename file on Windows XP
> 
> Hello everyone,
>  
> I am trying to rename a file like this:
>  
> rename($myFile, $newName);
>  
> The program dies there and says "Permission Denied."
>  
> What can I do in order to rename that file?
>  
> Thanks,
> Kathy
> 
>   
> -
>  Yahoo! FareChase - Search multiple travel sites in one click.  
> 

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




beginners@perl.org

2005-11-11 Thread Riano alejo
Anybody know a good emaillist for PHP BEGINERS???
 
Thank you
 
ALEJANDRO

kathyjjja <[EMAIL PROTECTED]> wrote:
Hello everyone,

I am trying to rename a file like this:

rename($myFile, $newName);

The program dies there and says "Permission Denied."

What can I do in order to rename that file?

Thanks,
Kathy


-
Yahoo! FareChase - Search multiple travel sites in one click. 


Need permissions to rename file on Windows XP

2005-11-11 Thread kathyjjja
Hello everyone,
 
I am trying to rename a file like this:
 
rename($myFile, $newName);
 
The program dies there and says "Permission Denied."
 
What can I do in order to rename that file?
 
Thanks,
Kathy


-
 Yahoo! FareChase - Search multiple travel sites in one click.  

RE: Help: Net::SFTP can't find my file..?

2005-11-11 Thread RICHARD FERNANDEZ
 
>If anyone can shed any light on this it would be much appreciated!
>TIA

>From an old tested snippet I have, put takes 2 arguments

$sftp->put($put_from, "$put_to_dir/$file") || die "Can't open $!\n";



--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html





Thank you zentara. This did it. I had tried supplying a file name for
the remote side, but I hadn't thought to give it the _full_path_ on the
remote side. Now I know :)

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




Re: Shortest One-liner to Rename Files

2005-11-11 Thread Randal L. Schwartz
> "Wijaya" == Wijaya Edward <[EMAIL PROTECTED]> writes:

Wijaya> Hi all,
Wijaya> I have a snippet that rename files from:
Wijaya> "sth.txt.out"  into
Wijaya> "sth.out"

Wijaya> Now I am really curious how can I make this
Wijaya> oneliner "even shorter":

Wijaya> $  perl -e '
Wijaya> for(glob ("*.txt.out")){
Wijaya> $out = $_; 
Wijaya> $out =~ s/\.txt(\.out)/\.out/;
Wijaya>  rename ($_,$out);
Wijaya> }'

Wijaya> Hope to hear from you again.

perl -e '($n = $_) =~ s/\.txt(\.out)$/$1/ and rename $_, $n for @ARGV' *

This is unsafe (as yours was) because a file "foo.txt.out" will be renamed
over the top of an existing "foo.out".  To protect that, add this:

perl -e '($n = $_) =~ s/\.txt(\.out)$/$1/ and not -e $n and rename $_, $n for 
@ARGV' *

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

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