comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
December 2006
motuwethfrsasuw
    123 48
45678910 49
11121314151617 50
18192021222324 51
25262728293031 52
2006
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Re: perl dbi sybase number of columns?         


Author: DJ Stunks
Date: Dec 27, 2006 18:36

jcharth@hotmail.com wrote:
> hello i am using perl dbi with sybase

The whole point of the DBI is to (and I quote) "provide a consistent
database interface, independent of the actual database being used."
Therefore it is entirely unimportant that you are querying a Sybase
database.
> i know that in php is easy to
> find out the number of columns with any sql query.

Isn't PHP great?
> is there a way to
> know how many values are stored in the array that stores the result of
> the query? any code samples? thank.s

did you read the documentation for the module you're trying to use? or
did you think it would be easier to have us read it to you?

perldoc DBI

hint: pay particular attention to the section on "Statement Handle
Attributes"

-jp
Show full article (0.88Kb)
no comments
  Re: Perl equivalent to the following shell operation.         


Author: Dave
Date: Dec 27, 2006 10:03

"Dave" ntlworld.com> wrote in message
news:45923841$0$27396$ba4acef3@news.orange.fr...
>
> "grocery_stocker" gmail.com> wrote in message
> news:1167196566.656836.31470@f1g2000cwa.googlegroups.com...
>>
>> grocery_stocker wrote:
>>> I'm analyzing a really large file. While I was bringing in carts at
>>> work, I figured it would be easier/more efficient just to split the
>>> file, sort it in parallel, then merge it. If I wrote a shell script, I
>>> would do something like the following:
>>>
>>> #This code is duped from a google search
>>> (cat list1 list2 list3 | sort | uniq > list123) &
>>> (cat list4 list5 list6 | sort | uniq > list456) &
>>>
>>> wait
>>>
>>> diff list123 list456
>>> ...
Show full article (1.46Kb)
no comments
  Google Custom Search Engine         


Author: robert.hundt
Date: Dec 27, 2006 08:25

Hi,

I created a Google Custom Search Engine for searching on:

"Software / Compilers / Optimization"

This is basically a regular full Google search giving preference to
technical sites such as IEEE, ACM, citeseer, the Universities,
news-group (this one included), commercial sites such as Intel,
Microsoft, HP, Sun, IBM, and others. The search results are further
biased towards software development, programming languages, and
optimizing compilers

The results are indeed much more specific than the regular Google
search. Try ity out! Additionally, if you are interested, please send
me an email and you can contribute to this search engine and add sites
you believe should be given preference to. Over time, it should become
better and better...

I "donated" a no-nonsense URL: www.codeopt.com

Check it out - and let me know what you think (no rants, please)!

Cheers
-- Robert Hundt HP
no comments
  Re: Using clearcase command in perl script         


Author: Andrew DeFaria
Date: Dec 27, 2006 07:20

mnt006@gmail.com wrote:
> Thanks for responding. Cleartool makebranch command creates branch and
> checks out the file. It does take multiple files as input via command
> line.
>
> Actual command would look file following
>> cleartool mkbranch -nc my_branch_name /vobs/abc/foo1.c /vobs/abc/foo2.c
> "cleartool mkbranch -nc my_branch_name" would be constant string for
> all the files which are needed to be checked out.
>
> So from your suggestion I did try something like following.
>
> system("cleartool mkbranch -nc my_branch_name", @array);
>
> But due to some reason branch wasn't created.
You do realize you initially asked "How to I checkout files" not "How do
I call cleartool mkbranch" don't you?

How about this:
Show full article (3.02Kb)
no comments
  Date::Calc and postgres timestamp         


Author: jeff_jones_101
Date: Dec 27, 2006 06:50

Dear all,

I'd little a little hint on date comparison using Date::Cal module.

I take the first date from a postgres db where the field is declared
as:
created | timestamp(6) without time zone |
Selecting through DBI I receive a date in the form of
2006-12-14 16:08:39

The second one is a a Date::Calc

my ($y,$m,$d,$H,$M,$S) = Add_Delta_DHMS(Today_and_Now(),120,0,0,0);

I grasp a bit in Date:Calc documentation but I've not found a way to
convert the first in a delta vector, which I think it is the only way
Date:Calc could compare the the two dates.

How can I compare these two date type ?

Thanks
no comments
  FAQ 4.49 How do I process/modify each element of an array?         


Author: PerlFAQ Server
Date: Dec 27, 2006 06:03

This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

4.49: How do I process/modify each element of an array?

Use "for"/"foreach":

for (@lines) {
s/foo/bar/; # change that word
tr/XZ/ZX/; # swap those letters
}

Here's another; let's compute spherical volumes:

for (@volumes = @radii) { # @volumes has changed parts
$_ **= 3;
$_ *= (4/3) * 3.14159; # this will be constant folded
}

which can also be done with "map()" which is made to transform one list
into another:
Show full article (2.25Kb)
no comments
  Untitled         


Author: salantami
Date: Dec 27, 2006 05:58

no comments
  Use of Java script to validate form fields in Perl         


Author: Kuna
Date: Dec 27, 2006 01:06

Hi All,

I am trying to use Java script to validate the form fields. The code is
written in Perl and it is having a .pm extension for this form also
there is a index.pl file which is containing the "Save" button and the
form is posting the data to index.pl file and then it again comes to
the methods written in the .pm file which is validating the form using
server side code and submit that. But I am not able to get that where
to do the Java script validation that will validate the form in the
client side. Here I am having some codes that will give some idea about
my form.


print "



...
width='227' height='57'>
Show full article (5.54Kb)
1 Comment
  FAQ 4.68 How can I make the Perl equivalent of a C structure/C++ class/hash or array of hashes or arrays?         


Author: PerlFAQ Server
Date: Dec 27, 2006 00:03

This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

4.68: How can I make the Perl equivalent of a C structure/C++ class/hash or array of hashes or arrays?

Usually a hash ref, perhaps like this:

$record = {
NAME => "Jason",
EMPNO => 132,
TITLE => "deputy peon",
AGE => 23,
SALARY => 37_000,
PALS => [ "Norbert", "Rhys", "Phineas"],
};

References are documented in perlref and the upcoming perlreftut.
Examples of complex data structures are given in perldsc and perllol.
Examples of structures and object-oriented classes are in perltoot.
Show full article (1.70Kb)
no comments