how to insert records into table in oracle database.

2009-01-17 Thread Sureshkumar M (HCL Financial Services)

Hi,
Can some one help me how to insert records into oracle database
tables using Perl script? 

Regards,
Suresh


DISCLAIMER:
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

---

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




RE: date format search insdie the files

2008-11-29 Thread Sureshkumar M (HCL Financial Services)

Thanks a lot for your help,,


Can you explain me this part how it's works? 

 (?:\d{2}|\w{3})

?:   what this will do? 

And also, the output is like below


(C)/tmp/d$ perl 1
10-11-81
20-NOV-2008
05-07-1981
15-110-2008   this should not come as this as 3 digit month.
(C)/tmp/d$


Program:

(C)/tmp/d$ cat 1
#/usr/bin/perl
use strict;

open(DATA,")
{
print if /\b\d{2}\b-(\d{2}|\w{3})-\b\d{2,4}\b/;

}
close(DATA);
exit 0;
(C)/tmp/d$














-Original Message-
From: Dr.Ruud [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 29, 2008 5:30 PM
To: beginners@perl.org
Subject: Re: date format search insdie the files

"Sureshkumar M (HCL Financial Services)" schreef:

> #/usr/bin/perl
> open(DATA,"a1")||die"Unable to open the file";
> while()
> {
> if($_=~/\d{2}-(\d{2}|\w{3})-\d{1,4}/)
> {
> print $_;
> }
> }
> close(DATA);
> exit 0;

  #!/usr/bin/perl
  use strict;
  use warnings;

  my $in_name = "data.in";
  {   open my $in_fh, "<", $in_name
or die "Error with '$in_name': $!";

  while ( <$in_fh> ) {
  print if /\b\d{2}-(?:\d{2}|\w{3})-\d{1,4}/;
  }
  }
  __END__

-- 
Affijn, Ruud

"Gewoon is een tijger."

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



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.
---

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




Mailing list

2008-11-29 Thread Sureshkumar M (HCL Financial Services)
Hi All,

 

Can someone send the maid's for Perl forum where I can clear
all my doubts? I would like to discuss lot of doubts and get answer and
get quick answers.

 

Regards,

Suresh



RE: date format search insdie the files

2008-11-29 Thread Sureshkumar M (HCL Financial Services)
Hi all ,

 

Can someone help me on this

 



From: Sureshkumar M (HCL Financial Services) 
Sent: Saturday, November 29, 2008 4:21 PM
To: 'David Schmidt'
Cc: beginners@perl.org
Subject: RE: date format search insdie the files

 

Hi David,

 

  Thanks for the reply, but still I am not able to get expected
output from this.

Pls help me how to get this.

 

(C)/tmp/d$ cat a1

 

115-06-1979

10-11-81

20-NOV-2008

05-07-1981

welcome

20-03-20009

15-10-2008

 

 

(C)/tmp/d$ cat 1

#/usr/bin/perl

 

use strict;

use warnings;

 

open(DATA,"a1")||die"Unable to open the file";

 

while()

{

#if($_=~/\d\d\D(\d\d|\[a-zA-Z]{3})\D\d\d/)

if(/(\d{2}-(\d{2})|(\w{3})-\d{1,4})/)

{

#print $_;

print ;

}

}

close(DATA);

exit 0;

 

(C)/tmp/d$ perl 1   

115-06-1979

10-11-81

20-NOV-2008

05-07-1981

20-03-20009

15-10-2008

(C)/tmp/d$

 

 

 

 

 

 

 

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
David Schmidt
Sent: Saturday, November 29, 2008 3:12 PM
To: Sureshkumar M (HCL Financial Services); beginners@perl.org
Subject: Re: date format search insdie the files

 

You missed some parentheses

 

#!/usr/bin/perl

 

use strict;

use warnings;

 

open(DATA, '<', "data") || die"Unable to open the file";

while() {

#if($_=~/\d{2}-(\d{2}|\w{3})-\d{1,4}/) {

if(/(\d{2}-(\d{2})|(\w{3})-\d{1,4})/) {

print;

}

}

close(DATA);

exit 0;

 

 

On Sat, Nov 29, 2008 at 10:11 AM, Sureshkumar M (HCL Financial

Services) <[EMAIL PROTECTED]> wrote:

> Hi All,

> 

>I try to search the string which has the date format inside

> the file,

> 

> But i am not able to get the desired files. Pls help me on this..

> 

> 

> 

> 

> 

> 

> 

> C)/tmp/sms/perl$ cat a1

> 

> 

> 

> 115-06-1979

> 

> 10-11-81

> 

> 20-NOV-2008

> 

> 05-07-1981

> 

> welcome

> 

> 15-10-2008

> 

> 12-03-20009

> 

> 

> 

> 

> 

> (C)/tmp/sms/perl$ cat 1

> 

> 

> 

> #/usr/bin/perl

> 

> open(DATA,"a1")||die"Unable to open the file";

> 

> 

> 

> while()

> 

> {

> 

> if($_=~/\d{2}-(\d{2}|\w{3})-\d{1,4}/)

> 

> {

> 

> print $_;

> 

> }

> 

> }

> 

> close(DATA);

> 

> exit 0;

> 

> (C)/tmp/sms/perl$

> 

> 

> 

> 

> 

> 

> 

> Output should be  :

> 

> 

> 

> 10-11-81

> 

> 20-NOV-2008

> 

> 05-07-1981

> 

> 15-10-2008

> 

> 

> 

> 

> 

> 

> 

> 

> 

> 

> 

> 

 

 

 

-- 

David Schmidt   |   http://www.fm5.at



RE: date format search insdie the files

2008-11-29 Thread Sureshkumar M (HCL Financial Services)

Hi David,

 

  Thanks for the reply, but still I am not able to get expected
output from this.

Pls help me how to get this.

 

(C)/tmp/d$ cat a1

 

115-06-1979

10-11-81

20-NOV-2008

05-07-1981

welcome

20-03-20009

15-10-2008

 

 

(C)/tmp/d$ cat 1

#/usr/bin/perl

 

use strict;

use warnings;

 

open(DATA,"a1")||die"Unable to open the file";

 

while()

{

#if($_=~/\d\d\D(\d\d|\[a-zA-Z]{3})\D\d\d/)

if(/(\d{2}-(\d{2})|(\w{3})-\d{1,4})/)

{

#print $_;

print ;

}

}

close(DATA);

exit 0;

 

(C)/tmp/d$ perl 1   

115-06-1979

10-11-81

20-NOV-2008

05-07-1981

20-03-20009

15-10-2008

(C)/tmp/d$

 

 

 

 

 

 

 

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
David Schmidt
Sent: Saturday, November 29, 2008 3:12 PM
To: Sureshkumar M (HCL Financial Services); beginners@perl.org
Subject: Re: date format search insdie the files

 

You missed some parentheses

 

#!/usr/bin/perl

 

use strict;

use warnings;

 

open(DATA, '<', "data") || die"Unable to open the file";

while() {

#if($_=~/\d{2}-(\d{2}|\w{3})-\d{1,4}/) {

if(/(\d{2}-(\d{2})|(\w{3})-\d{1,4})/) {

print;

}

}

close(DATA);

exit 0;

 

 

On Sat, Nov 29, 2008 at 10:11 AM, Sureshkumar M (HCL Financial

Services) <[EMAIL PROTECTED]> wrote:

> Hi All,

> 

>I try to search the string which has the date format inside

> the file,

> 

> But i am not able to get the desired files. Pls help me on this..

> 

> 

> 

> 

> 

> 

> 

> C)/tmp/sms/perl$ cat a1

> 

> 

> 

> 115-06-1979

> 

> 10-11-81

> 

> 20-NOV-2008

> 

> 05-07-1981

> 

> welcome

> 

> 15-10-2008

> 

> 12-03-20009

> 

> 

> 

> 

> 

> (C)/tmp/sms/perl$ cat 1

> 

> 

> 

> #/usr/bin/perl

> 

> open(DATA,"a1")||die"Unable to open the file";

> 

> 

> 

> while()

> 

> {

> 

> if($_=~/\d{2}-(\d{2}|\w{3})-\d{1,4}/)

> 

> {

> 

> print $_;

> 

> }

> 

> }

> 

> close(DATA);

> 

> exit 0;

> 

> (C)/tmp/sms/perl$

> 

> 

> 

> 

> 

> 

> 

> Output should be  :

> 

> 

> 

> 10-11-81

> 

> 20-NOV-2008

> 

> 05-07-1981

> 

> 15-10-2008

> 

> 

> 

> 

> 

> 

> 

> 

> 

> 

> 

> 

 

 

 

-- 

David Schmidt   |   http://www.fm5.at



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.
---

date format search insdie the files

2008-11-29 Thread Sureshkumar M (HCL Financial Services)
Hi All,

I try to search the string which has the date format inside
the file,

But i am not able to get the desired files. Pls help me on this..

 

 

 

C)/tmp/sms/perl$ cat a1

 

115-06-1979

10-11-81

20-NOV-2008

05-07-1981

welcome

15-10-2008

12-03-20009

 

 

(C)/tmp/sms/perl$ cat 1

 

#/usr/bin/perl

open(DATA,"a1")||die"Unable to open the file";

 

while()

{

if($_=~/\d{2}-(\d{2}|\w{3})-\d{1,4}/)

{

print $_;

}

}

close(DATA);

exit 0;

(C)/tmp/sms/perl$

 

 

 

Output should be  :

 

10-11-81

20-NOV-2008

05-07-1981

15-10-2008

 

 

 

 

 



Date format search in the file

2008-11-22 Thread Sureshkumar M (HCL Financial Services)

Hi All,

 

  I want to find the string which are having the date inside the
file.

Please help me how do I match it,below is my program and it's not
returning anything.

 

 

 

#!/usr/bin/perl

open(DATA,"i")||die "Unable to open the file";

while()

{

if($_=~/(\d{2})([\W])\1\2\1]/)

{

print $_;

}

}

close(DATA);

exit 0;

~

Input file:

 

$cat i

15-06-79

05-06-1981

12-11-9

13-10-89

19-10-20009

1-10-0002

02-03-2008

03-nov-2008

 

$ 

 

 

Output should be:-

 

15-06-79

05-06-1981

13-10-89

02-03-2008

03-nov-2008

 

 

 

 



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.
---

String concatination.

2008-11-10 Thread Sureshkumar M (HCL Financial Services)

Hi all,

 

I have a string like below.

 

$string="ABCD";

 

While printing , I have to include some extra strings in prefix and
suffix of the stringlike below...

 

 

abcABCDxyz

 

how do I do this.? 

 

actually I tried like below..

 

print "abc$sting\xyz";

 

But It's not coming as like I expected(abcABCDxyz)

 

Pls some one help me on this.

 

 



DISCLAIMER:
---
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.
---