Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Re: Perl scripts to do extraction into Sybase

by hotyopa (Scribe)
on Jan 10, 2001 at 04:09 UTC ( [id://50822]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Perl scripts to do extraction into Sybase
in thread Perl scripts to do extraction into Sybase

2 issues for you, best tackled one at a time. I've had to learn to do them both over the last little while, and barely suffered at all :)

  1. Reading flat files. This is a v. basic example which reads the file line at a time and prints the results. You could modify this approach to send to Sybase instead:
    #!/usr/local/bin/perl -w if (open(MYFILE, "path/to/file")) { $line = <MYFILE>; while ($line ne "") { print ($line); $line = <MYFILE>; } }
  2. Talking to a Sybase database. You'll need to come to grips with DBI/DBD. I doubt you will find it too difficult. It is pretty much a case of connecting to the database, executing an SQL command, then retrieving the results. The Tricks with DBI tutorial by btrott should head you off in the right direction.

    Have a look at davorg's reply below as well :)

*~-}o{-~*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://50822]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-26 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found