Re: Perl scripts to do extraction into Sybase
by hotyopa (Scribe) on Jan 09, 2001 at 08:15 UTC
|
A big question indeed. I doubt that there is one script that does everything you want all at once, so you would be best to take things one at time.
First of all, look here for a good introductory tutorial that should head you off in the right direction. Perl Monks' own tutorials contain a wealth of information.
Next, epoptai's home node has links to a number of online books that you might want to keep handy. You might want to consider reverse engineering the scripts you have using these books, since (I assume) you know what they do, if not exactly how they do it.
Not sure what a particular function does? Try "perldoc -f" followed by the name of the function at the command line...
Specifically regarding databases and Perl, I found this tutorial very clear and concise for a newbie like me:
One of the most confusing things I found about Perl when I first started where the regular expressions (seen something like s/\t.?\\s/ in your code?). Check out String matching and Regular Expressions and Common Regex Gotchas for help on this issue.
I hope this has been of some help. Good luck...
*~-}o{-~* | [reply] |
|
|
thank you for the prompt reply..
and apologies for putting so much in one Qs. :)
anyways, let me rephrase my Qs:
how would you load data from a flat file into a sybase database using perl scripts?
| [reply] |
|
|
| [reply] [d/l] |
Re: Perl scripts to do extraction into Sybase
by davorg (Chancellor) on Jan 09, 2001 at 13:34 UTC
|
Any script to insert data into a Sybase database will
probably be using Sybperl or DBI/DBD::Sybase. The author
of both of these modules is Michael Peppler and you can get
a lot of good information from his web page at
Also, I've done more than my fair share of Sybase/Perl
work, so feel free to ask me anything.
Oh... and it's Perl, not PERL!
--
<http://www.dave.org.uk>
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
| [reply] |
Re: Perl scripts to do extraction into Sybase
by PsychoSpunk (Hermit) on Jan 09, 2001 at 11:33 UTC
|
In addition to hotyopa's advice, it truly looks like you have a specific task at hand which you are trying to understand. To this end, take your mouse from the location of this node and drag it up to the textbox in the left portion of that colored bar. Type anything your heart desires and see what happens.
Seriously, you're asking for a whole lot of information, and doing it in a very general manner at that. Look through older nodes that deal with Sybase, Access, flat files, and whatever else you may need. You may find that the solution presents itself in a very clear and easy to implement way. Most likely, you'll have to massage the problem.
You are not far from help, for if you care to post specific problematic areas, someone will know the answer. But remember that a good post is one which helps us as much as we can help you. And from what I've seen, these monks can only help when they fully understand a problem.
ALL HAIL BRAK!!! | [reply] |
Re: Scripts to extract data..
by hotyopa (Scribe) on Jan 16, 2001 at 03:22 UTC
|
ash_meh, nothing has changed since the last time I answered this exact question! What you seem to want is to understand Perl without having to learn it. I don't think that is possible.
If you think this is a little harsh, perhaps you could highlight some parts of the scripts that you don't understand by posting the code here...
*~-}o{-~* | [reply] |
Re: Scripts to extract data..
by extremely (Priest) on Jan 16, 2001 at 02:42 UTC
|
I've worked with Sybase, and Perl for years and from what
you've told us I can't honestly make a good guess about
the scripts on your system do at all. Seriously, what you
are asking is like: "I have a car and all the screws are
metric, can you tell me what brand of oil filter it uses?"
Unless the scripts themselves are well documented with
comments no one here can tell you much of anything useful
without seeing the code. You've asked exactly this question
before and once again we're all going to tell you we don't
email people, we have this whole great website to communicate
with.
--
$you = new YOU;
honk() if $you->love(perl) | [reply] |
Re: Scripts to extract data..
by Nakano (Novice) on Jan 16, 2001 at 03:02 UTC
|
While I'm not familiar with Sybase, so I don't know wether or not
these scripts you speak of were bundled with the software (in which
case there might be some unbelieveably slim chance that someone on the net
had posted something about them) or whether they were custom
writen for your company (in which case no, you won't be able to
find any sort of documentation for them).
However, if you just wish to interpret them, there are several
things you could do... The easiest would be simply to try to
track down whomever wrote them originally and see if you can get them
to explain it to you. Sometimes author's will put an email address
in the headers of a script so they can be contacted if bugs are found.
short of that, you could learn perl, which, even if you had someone
sit down and explain to you what the script did, is the only real
way you're ever going to be able to actually understand
the script. Perl isn't an easy language to learn if you have
no expirence, but its a very valueable thing to know.
-Nakano | [reply] |