>
> The part that confuses me is:
>
> ($who, $rest) = split /:\s*/, $line, 2;
>
> I understand that it takes the input and splits it into two
> parts along the regular expression, but I can't figure out
> what the 2 means.
>
split the expression into a maximum of 2
perldoc -f split
--
Matthew Sacks wrote:
> Greetings,
Hello,
> The below examples are from the CPAN page on IO::FILE.
> If understand them, the examples are always printing to the
> handle, even if the file was opened for readonly?
No, the first and third examples are printing to STDOUT.
> Are some of these exampl
hiall:
I am writing a regexp rename script as an exercise for
learning perl. Here's what it's suppose to do:
regren.pl "REGEXP1" "REGEXP2"
would do
$ARG1 = shift @ARGV;
$ARG2 = shift @ARGV;
// some code to obtain a filename list and loop:
$filename =~ s/$ARG1/$ARG2/
and rename the file accordi
Greetings,
The below examples are from the CPAN page on IO::FILE.
If understand them, the examples are always printing to the handle, even if the
file was opened for readonly? Are some of these examples expected to fail
(and raise exceptions)? Why does he have to autoflush at the end?
matthew
Matthew Sacks wrote:
> Hello Folks,
>
> Has anybody used Data::Table?
>
> I am specifically interested munching some huge tab separated file. When
> reading/writing it, I want to be very strict about what characters comprise
> valid data.
>
> Suggestions?
>
> -matthew
>
Text::CVS_XS is
Hello Folks,
Has anybody used Data::Table?
I am specifically interested munching some huge tab separated file. When
reading/writing it, I want to be very strict about what characters comprise
valid data.
Suggestions?
-matthew
-
Yahoo! for
On 9/23/05, Ryan Frantz <[EMAIL PROTECTED]> wrote:
>
>
> > -Original Message-
> > From: Ankur Gupta [mailto:[EMAIL PROTECTED]
> > Sent: Friday, September 23, 2005 2:48 PM
> > To: Dave Adams
> > Cc: beginners perl
> > Subject: Re: Looking for perl scripts to remove ^M
> >
> > On 9/23/2005 11
hi,everyone,
I want to move my web applications which written by traditional CGI to
mod_perl.Is there any risk or difficulty here?
The applications are something about webmail.Which module under mod_perl
is suited for me?
Any advise or reference to me should be appreciated.TKS.
--
Jeff Pan
[E
Ryan Frantz wrote:
> Perlers,
Hello,
> I'm working on a small script that checks the free space on local fixed
> drives on my system. Since there other drive types (i.e. floppy,
> CD-ROM, network maps) I want to exclude those. I decided to use a hash
> but the script still displays all of the d
> -Original Message-
> From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 23, 2005 3:45 PM
> To: Ryan Frantz
> Cc: beginners perl
> Subject: Re: Hash Problem
>
> On Sep 23, Ryan Frantz said:
>
> > I'm working on a small script that checks the free space on loc
On Sep 23, Ryan Frantz said:
I'm working on a small script that checks the free space on local fixed
drives on my system. Since there other drive types (i.e. floppy,
CD-ROM, network maps) I want to exclude those. I decided to use a hash
but the script still displays all of the drives on my sys
> -Original Message-
> From: Bakken, Luke [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 23, 2005 3:26 PM
> To: Ryan Frantz
> Subject: RE: Hash Problem
>
> Ryan Frantz wrote:
>
> > my %ignoreDriveTypes = (
> > 'floppy' => '2',
> > 'network' => '4',
> > 'cdROM' => '5',
> >
Perlers,
I'm working on a small script that checks the free space on local fixed
drives on my system. Since there other drive types (i.e. floppy,
CD-ROM, network maps) I want to exclude those. I decided to use a hash
but the script still displays all of the drives on my system. If I just
use si
Ryan Frantz wrote:
>
>>-Original Message-
>>From: Ankur Gupta [mailto:[EMAIL PROTECTED]
>>Sent: Friday, September 23, 2005 2:48 PM
>>To: Dave Adams
>>Cc: beginners perl
>>Subject: Re: Looking for perl scripts to remove ^M
>>
>>On 9/23/2005 11:28 PM Dave Adams wrote:
>>
>>
>>>Sometimes I ge
Hello
I am noticing a strange phenomenon and I would
appreciate it if someone helped me understand it
in my shell when I execute ulimit -a
I get
% ulimit -a
time(seconds)unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes)unlimited
memory(kbytes
> -Original Message-
> From: Ankur Gupta [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 23, 2005 2:48 PM
> To: Dave Adams
> Cc: beginners perl
> Subject: Re: Looking for perl scripts to remove ^M
>
> On 9/23/2005 11:28 PM Dave Adams wrote:
>
> > Sometimes I get perl scripts that we
On 9/23/2005 11:28 PM Dave Adams wrote:
Sometimes I get perl scripts that were developed on windows and then
brought over to UNIX and the scripts contain all the pesky
metacharacters of ^M and excessive blank lines.
Does anyone have a simple script to clean these files up or suggestions?
If y
r huber wrote:
> Is the a formatted read in perl? I have fixed length
> records that need to be split up into separate
> fields/variables and there is no delimiter. I've
> checked my perl book and can not find anything other
> than doing a series of substr's.
You can set the Input Record Separator
On Fri, 23 Sep 2005, Dave Adams wrote:
> Sometimes I get perl scripts that were developed on windows and then
> brought over to UNIX and the scripts contain all the pesky
> metacharacters of ^M and excessive blank lines.
>
> Does anyone have a simple script to clean these files up or suggestions?
On Sep 23, Dave Adams said:
Sometimes I get perl scripts that were developed on windows and then
brought over to UNIX and the scripts contain all the pesky
metacharacters of ^M and excessive blank lines.
Does anyone have a simple script to clean these files up or suggestions?
Many unix platfo
> -Original Message-
> From: Dave Adams [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 23, 2005 1:59 PM
> To: beginners perl
> Subject: Looking for perl scripts to remove ^M
>
> Sometimes I get perl scripts that were developed on windows and then
> brought over to UNIX and the scrip
Sometimes I get perl scripts that were developed on windows and then
brought over to UNIX and the scripts contain all the pesky
metacharacters of ^M and excessive blank lines.
Does anyone have a simple script to clean these files up or suggestions?
My appreciation in advance,
DA
--
To unsubscrib
On Fri, Sep 23, 2005 at 07:22:01AM -0700, r huber wrote:
> Is the a formatted read in perl? I have fixed length
> records that need to be split up into separate
> fields/variables and there is no delimiter. I've
> checked my perl book and can not find anything other
> than doing a series of substr
Thanks a lot Jeff.
Sorry for posting the partial code. I should take care next time.
The error that I made was to receieve the output of `my_utility` in scalar
my $out = `my_utitlity`.
After changing it to list as
my @out = `my_utility` and using grep on it worked like charm.
I didnt correctly
>${$html_ref} .= <<"___HTML___";
> Content-type: text/html
>
> Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd";>
>
>
> CONTENT="text/html; charset=iso-8859-1">
> Hotspot Tracker
> HREF="$get_to_indexcss/hotspot.css" TYPE="text/css"
> MEDIA="screen">
>
> in t
Is the a formatted read in perl? I have fixed length
records that need to be split up into separate
fields/variables and there is no delimiter. I've
checked my perl book and can not find anything other
than doing a series of substr's.
Thanks,
rj
_
Reinstall seems to work thanks Bill
-Original Message-
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 22, 2005 3:32 PM
To: O'Brien, Bill; Perl
Subject: Re: trying to run net::ssh::perl have errors
Please bottom post...
Please group reply so others can help a
On Sep 23, Frank Geueke, III said:
text immediately following the variable name. How do
I tell Perl that the text is not part of the variable
name? Here's my code:
You wrap the *name* of the variable in braces:
print "${get_to_index}css/hotspot.css";
--
Jeff "japhy" Pinyan% How
On Sep 23, Manish Sapariya said:
I want to have pure perl equivalent of following:
my $out = `my_utility | grep manish`;
which will give me the lines containing manish in the output
of my_utility in variable $out.
You'd use the aptly-named grep() function in Perl to get only those
elements
Frank Geueke, III wrote:
> Thanks for the help with the reverse if and else. I
> ended up using a single line forward if on a
> single line. Now my next question. I'm using a jumbo
> here tag (I think that's what they're called) to add
> html to a string. I need to use a variable within the
>
I want to have pure perl equivalent of following:
my $out = `my_utility | grep manish`;
which will give me the lines containing manish in the output
of my_utility in variable $out.
-
my $out = doMyUtility();
# I dont know how to now grep on $out and process it the ma
Thanks for the help with the reverse if and else. I
ended up using a single line forward if on a
single line. Now my next question. I'm using a jumbo
here tag (I think that's what they're called) to add
html to a string. I need to use a variable within the
tag (done this before, no problem) bu
On Sep 23, Manish Sapariya said:
In following db functions I am using returned "statement handle "
and afterword just ignoring it and overwrite it with the newly
returned value.
Does this cause memory leak/ or any kind of resouce leak?
Can I reuse statement handle in such a way? If not, what is
In following db functions I am using returned "statement handle "
and afterword just ignoring it and overwrite it with the newly
returned value.
Does this cause memory leak/ or any kind of resouce leak?
Can I reuse statement handle in such a way? If not, what is
cleaner way to do it?
---
Hy,
If i under stand clearly try this
my $s="'123PS01A'~^ '123PS01B'~^ '123PS01C'~^ '123PS01D'~^";
my @abhi=split(/ /,$s);
for ( my $i=0;$i<@abhi;$i++) {
print $abhi[$i] . "\n";
}
Abhishek Dave
- Original Message -
From: "Mayank Ahuja" <[EMAIL PROTECTED]>
Newsgroups:
35 matches
Mail list logo