In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote:
[...]
> while () {
>
> chomp;
> print;
> last if /^0$/;
> }
>
> print "\n";
Whoops, too fast for my own good (points off for carelessness):
while () {
chomp;
print unless /^0$/;
}
print "\n";
__END__
But what I'm not
In article
<[EMAIL PROTECTED]>,
Chandrasekaran Mythili wrote:
> HI,
>
> I am new to Perl and I need some help regarding tranfering the contents of
> one file to other file in specified format using perl.
>
> the problem is i have one file with data(data is in hex) as follows:
> 48
> 30
> 20
> 2E
Kevin Old wrote:
> Hello everyone,
>
> Thanks to everyone who helped with my last problem last week. I've hit
> a snag in another problem this week.
>
> I need to parse the following data:
>
> "COUNTRY MUSIC HALL OF FAME UPC#: 0-84296-22922-2"||"COUNTRY FEMALE
> PARTY SONGS VOL. 2 UPC#: 0-8
Francesco del Vecchio wrote:
> Hi to all,
>
> I need to parse javascript into web pages to substitute all relative addresses to
> absolute ones.
Why? Are you in a masochistic frame of mind?
>
>
> I do this job in the HTML using LWP but I'm having bad times trying to do it into
> javascript
>
PerlDiscuss - Perl Newsgroups and mailing lists wrote:
> HI,
>
> I am brand new to Perl and I am trying to modify a script that someone
> else wrote.
Please don't. That is not the way to learn Perl. Learn Perl first, get very
confortable with it, starting with the basics, then try to adapt exis
HI,
I am new to Perl and I need some help regarding tranfering the contents of
one file to other file in specified format using perl.
the problem is i have one file with data(data is in hex) as follows:
48
30
20
2E
2E
2E
0
0
0
i want to copy the contents of this file to another file till 0 is
en
In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote:
[...]
> The thing to add (I'd have to check the Perl Cookbook for the terminology)
> is a "reverse lookup"(?) so that in addition to:
>
> $album{$upc}
>
> you could also access your data via:
>
> $album{$album_name}
>
> (I think -- trying to
In article <[EMAIL PROTECTED]>, Kevin Old wrote:
[...]
> Then the rest of the lines are "Tracks" and "Artists". What I need to
> do is get the appropriate tracks and artists in respective (@tracks,
> @artists) arrays inside the hash.
>
> Basically, I need to know how to write code that does this
On Tuesday, October 21, 2003 16:01, Kevin Pfeiffer wrote:
>In article <[EMAIL PROTECTED]>, Steve Grazzini wrote:
>
>> On Tue, Oct 21, 2003 at 01:06:44PM -0700, Jeff Westman wrote:
>>> Steve Grazzini <[EMAIL PROTECTED]> wrote:
>>> > On Tue, Oct 21, 2003 at 12:17:17PM -0700, Jeff Westman wrote:
>>>
> Can someone tell me how to extract the uncompressed data from the
returned value using the script below? I try and print the $fio
variable, but I get some hash reference. Do I need to iterate through
this hash and then print the values or am I just going about this all
wrong? I am trying to just
On Tue, 2003-10-21 at 16:49, Kevin Pfeiffer wrote:
> In article <[EMAIL PROTECTED]>, Kevin Old wrote:
> [...]
> > I need to parse the following data:
> >
> > "COUNTRY MUSIC HALL OF FAME UPC#: 0-84296-22922-2"||"COUNTRY FEMALE
> > PARTY SONGS VOL. 2 UPC#: 0-84296-28682-9"||"COUNTRY MALE P
In article <[EMAIL PROTECTED]>, Steve Grazzini wrote:
> On Tue, Oct 21, 2003 at 01:06:44PM -0700, Jeff Westman wrote:
>> Steve Grazzini <[EMAIL PROTECTED]> wrote:
>> > On Tue, Oct 21, 2003 at 12:17:17PM -0700, Jeff Westman wrote:
>> > > # ... but can I do something like
>> > > print "first\n"
Exactly what structure you want to end up with isn't clear, but I assume
you that you need to keep the tracks and artists associated with their
UPCs. If there were only one upc and one track/artist per line, grouped by
upc, it would be easier. The position of the track/artist on each line is
wh
In article <[EMAIL PROTECTED]>, Kevin Old wrote:
[...]
> I need to parse the following data:
>
> "COUNTRY MUSIC HALL OF FAME UPC#: 0-84296-22922-2"||"COUNTRY FEMALE
> PARTY SONGS VOL. 2 UPC#: 0-84296-28682-9"||"COUNTRY MALE PARTY
> SONGS VOL. 2 UPC#: 0-84296-28652-2"||| ||
On Tue, Oct 21, 2003 at 01:06:44PM -0700, Jeff Westman wrote:
> Steve Grazzini <[EMAIL PROTECTED]> wrote:
> > On Tue, Oct 21, 2003 at 12:17:17PM -0700, Jeff Westman wrote:
> > > # ... but can I do something like
> > > print "first\n" unless ($counter) else { print "second\n";
> >
> > Not reall
Steve Grazzini <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 21, 2003 at 12:17:17PM -0700, Jeff Westman wrote:
> > # ... but can I do something like
> > print "first\n" unless ($counter) else { print "second\n";
>
> Not really. You could use the conditional operator, though.
>
> print $counter
> -Original Message-
> From: Steve Grazzini [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 21, 2003 11:43 AM
> To: LoBue, Mark
> Cc: [EMAIL PROTECTED]
> Subject: Re: alias in the shell
>
>
> On Tue, Oct 21, 2003 at 11:35:15AM -0700, LoBue, Mark wrote:
> > Someone is missing the point,
On Tue, Oct 21, 2003 at 12:17:17PM -0700, Jeff Westman wrote:
> # ... but can I do something like
> print "first\n" unless ($counter) else { print "second\n";
Not really. You could use the conditional operator, though.
print $counter ? "second\n" : "first\n";
--
Steve
--
To unsubscribe
On Tue, Oct 21, 2003 at 02:45:50PM -0400, Raghu Murthy wrote:
> How do I include a sed command in perl.
>
> If i do sed -e"s\./ " file_name it works fine at the command prompt.
> But if i include the sed command in perl it does not return any value.
>
> I tried doing system("sed -e"s\./.." f
Hi . very trivial ... is there a way or correct syntax to add an 'if' tp
the following 'unless' statement?
# this works fine ...
print "first\n" unless ($counter);
# ... but can I do something like
print "first\n" unless ($counter) else { print "second\n";
# (syntax error)
I know I can do
On Tue, Oct 21, 2003 at 11:35:15AM -0700, LoBue, Mark wrote:
> Someone is missing the point, I'm not sure who yet.
I'll admit to going on a tangent... :-) The original topic was how
to create a shell alias from Perl.
> No, that won't work, because the alias command is running in a forked child.
How do I include a sed command in perl.
If i do sed -e"s\./ " file_name it works fine at the command prompt. But
if i include the sed command in perl it does not return any value.
I tried doing system("sed -e"s\./.." file_name"); it does not do anything.
Is there something wrong in how i ha
Someone is missing the point, I'm not sure who yet.
> -Original Message-
> From: Steve Grazzini [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 17, 2003 10:10 PM
> To: Smoot Carl-Mitchell
> Cc: [EMAIL PROTECTED]
> Subject: Re: alias in the shell
>
>
> On Fri, Oct 17, 2003 at 04:05:10PM
In article <[EMAIL PROTECTED]>, Rob Dixon wrote:
> Kevin Old wrote:
>>
>> Thanks to everyone who helped with my last problem last week. I've hit
>> a snag in another problem this week.
>>
>> I need to parse the following data:
>
> [snip]
>
>
>
> I'd like to help Kevin, but please post your da
my $return_value = eval {$code_or_sub_programme};
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
In article <[EMAIL PROTECTED]>,
Paul Harwood purportedly wrote:
> This isn't working for some reason. The $date scalar seems unchanged
> throughout.
>
> Paul Harwood wrote:
>>
>> I want to search a directory of log files and populate a list of those
>> log files ONLY if they match today's
On Tue, 2003-10-21 at 13:54, Rob Dixon wrote:
> Kevin Old wrote:
> >
> > Thanks to everyone who helped with my last problem last week. I've hit
> > a snag in another problem this week.
> >
> > I need to parse the following data:
>
> [snip]
>
>
>
> I'd like to help Kevin, but please post your d
Can someone tell me how to extract the uncompressed data from the returned value using
the script below? I try and print the $fio variable, but I get some hash reference. Do
I need to iterate through this hash and then print the values or am I just going about
this all wrong? I am trying to just
Kevin Old wrote:
>
> Thanks to everyone who helped with my last problem last week. I've hit
> a snag in another problem this week.
>
> I need to parse the following data:
[snip]
I'd like to help Kevin, but please post your data
as an attachment or (even better) as an Internet
link. Line wrappi
Hi Jonathan.
This thread needs splitting. And you need to formulate and ask
one question at a time. There's no use in starting with an
entire program that doesn't work and trying to fix it. Model
each of your problems in a tiny piece of Perl and fix them
one at a time. It will help you as well as
Hello everyone,
Thanks to everyone who helped with my last problem last week. I've hit
a snag in another problem this week.
I need to parse the following data:
"COUNTRY MUSIC HALL OF FAME UPC#: 0-84296-22922-2"||"COUNTRY FEMALE
PARTY SONGS VOL. 2 UPC#: 0-84296-28682-9"||"COUNTRY MALE
- Original Message -
From: "Rob Dixon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2003 4:31 AM
Subject: Re: Beginning beginner needing references help
> Jonathan Mangin wrote:
> >
> > Jeez, this is a beginner's list?
> >
Thank you for all the responses. I'll t
I think there's a function called eval which lets you evaluate perl code
on the fly. http://www.perldoc.com/perl5.8.0/pod/func/eval.html
-Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> Andrew Shitov wrote:
> >> This will call a new perl process, and may be more expensive on the
> >> system. On the other hand I can do
> >
> > <...>
> >
> >> But How do I get the reponse of the script.
> >
> >
> > Probably the simpliest way is to make called script a module and run it
> >
> As I've said before:
>
>You have exceeded the 4-line .sig boilerplate limit with a
>worthless unenforcable disclaimer. Please remove this text from
>future postings to this mailing list. If you cannot do so for
>mail from your domain, please get a freemail account and rejoin
>
Hi Joseph.
R. Joseph Newton wrote:
>
> Jonathan Mangin wrote:
> >
> > Jeez, this is a beginner's list? Y'all are defining my
> > ignorance of this here purrl stuff. I hope someone with
> > patience can help me out. In a simple login/registration
> > program using 5.6.1...
> >
> > #!/usr/bin/perl
Jonathan Mangin wrote:
> Jeez, this is a beginner's list? Y'all are defining my ignorance of this here purrl
> stuff.
> I hope someone with patience can help me out. In a simple login/registration program
> using 5.6.1...
>
> #!/usr/bin/perl -wT
> use strict;
Something is screwy here ...
> [CGI
> "David" == David Van Der Geer <[EMAIL PROTECTED]> writes:
David> *
David> This message is intended only for the person or entity to
David> which it is addressed and may contain confidential and/or
David> privileged informat
John W. Krahn wrote:
> Chinku Simon wrote:
>
> > I have a requirement to find out the size of a file existing
> > in an NTFS file system.
>
> my $file_size = -s $file_name;
>
> perldoc -f -s
Thanks John.
It's also worth pointing out that the '-s' operator is
/indentical/ to calling 'stat' and tak
Andrew Shitov wrote:
This will call a new perl process, and may be more expensive on the
system. On the other hand I can do
<...>
But How do I get the reponse of the script.
Probably the simpliest way is to make called script a module and run it
using either 'use' or 'require'.
Precisely , Bu
Hi to all,
I need to parse javascript into web pages to substitute all relative addresses to
absolute ones.
I do this job in the HTML using LWP but I'm having bad times trying to do it into
javascript
contained in the page.
Can anyone help me?
Frank
__
Do you
<[EMAIL PROTECTED]> wrote:
>
> I am brand new to Perl and I am trying to modify a script that
> someone else wrote.
>
>
> I have this line where primaryntaccount = something like this
> domainname\userid
>
> Token=primaryntaccount:: %ntaccount% = (\\w+).*$
>
> I want to pass a different value for p
Jonathan Mangin wrote:
>
> Jeez, this is a beginner's list? Y'all are defining my
> ignorance of this here purrl stuff. I hope someone with
> patience can help me out. In a simple login/registration
> program using 5.6.1...
>
> #!/usr/bin/perl -wT
> use strict;
>
> [CGI and DBI stuff]
>
> $countryi
This will call a new perl process, and may be more expensive on the
system. On the other hand I can do
<...>
But How do I get the reponse of the script.
Probably the simpliest way is to make called script a module and run it
using either 'use' or 'require'.
--
To unsubscribe, e-mail: [EMAIL PROT
Does opening a new browser causes a new session in either of the two?
What for are you going to use sessions? I mean: is threr a real
necessity of using some modules?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Jonathan Mangin wrote:
> Jeez, this is a beginner's list? Y'all are defining my ignorance of this
> here purrl stuff. I hope someone with patience can help me out. In a
> simple login/registration program using 5.6.1...
>
> #!/usr/bin/perl -wT
> use strict;
>
> [CGI and DBI stuff]
IOW, importan
This isn't working for some reason. The $date scalar seems unchanged throughout.
Paul Harwood wrote:
>
> I want to search a directory of log files and populate a list of those
> log files ONLY if they match today's date (localtime).
>
> $logs = 'c:\logs\W3SVC1';
> opendir LOGS, "$logs" or die "C
> How Can I call a perl script within my main script
> If I do
> $response=`perl $somescript $args`;
This will fork and open a shell so is slow
>do "$somescript $args";
> But How do I get the reponse of the script.
> Is there a way or should I just use the backticks
Please look at sys
48 matches
Mail list logo