Friday, June 13, 2008

I use the select method to obtain a limit of 4 rows from mysql table.

I now want to store these 4 rows into separate arrays so i can create navigation without having to connect to my database again.How is this done?

Here is some perl code...

open(IN-"\\\\167.16.244.x\\ccaut\\stratus.job");
while(<IN>)
{
chomp $_;

next if ($_ !~ /\w+/);

if ($_ =~ /Including holidays/i)
{
$holiday = 1;
}

if ($_ =~ /^Process/)
{
.....

my questions:
1) What is the \\\\ for in the first line?
2) In the While (<IN>) line- does it go through each line in the file?
3) What exactly is this line doing "next if ($_ !~ /\w+/);"?
I couldn t find what !~ nor / /

THANKS!!!

Well this is on behalf of one of my friends:

http://img383.imageshack.us/img383/4205/12010492mh0.png

He gets this when he tried to read the book- also on another .chm book he also got this too

There s probably a simple answer to this but i dont know so....

I have the latest version of Perl. I think i have to use terminal. only question is where my perl scripts need to be located on my mac for it to work??
I have a manual for windows and it says that perl is saved on c:/perl/bin or something but it s obviously different on a mac so now terminal tells me it can t find the command....

I have a variable
$a = " \\Hello\hi";
I have to print whatever is in between quotes escaping the backslash.
I have to print \\hello\hi

Sample Input Data:
ACBI Acta Biotheoretica 0001-5342 KAP (JC: 00000033)
ACBONE Acta Botanica Neerlandica 0044-5983 <None>

Problem:
I have this sample data above where in i need to copy only the line after each number. can someone please help or can giv a smple on how to do it in perl???

Sample output Data:
ACBI Acta Biotheoretica
ACBONE Acta Botanica Neerlandica

No comments: