Hi All,
I need to compare between two Associative Arrays
How can I do it ?
Is there a better way then insert all values in regular arrays
and to compare between the two ?
Amit
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Families Laws wrote:
>
> The Unix command is: `cp -ip $file1 $file2`. I needed
> to know if the cp operation is successful. I tried
> $result = `cp -ip $file1 $file2`;
> $result does not contain any value after the execution
> even when $file1 does not exist.
>
> How can I find out if the 'cp' o
At 10:21 PM 1/2/02 -0800, Families Laws wrote:
>The Unix command is: `cp -ip $file1 $file2`. I needed
>to know if the cp operation is successful. I tried
>$result = `cp -ip $file1 $file2`;
>$result does not contain any value after the execution
>even when $file1 does not exist.
>
>How can I find o
The Unix command is: `cp -ip $file1 $file2`. I needed
to know if the cp operation is successful. I tried
$result = `cp -ip $file1 $file2`;
$result does not contain any value after the execution
even when $file1 does not exist.
How can I find out if the 'cp' operation is successful
or not ?
Thank
"Hanson, Robert" <[EMAIL PROTECTED]> writes:
> One way is to do this...
>
> while ( my $line = ) {
> next if ( /^\s*$/ );
> }
NO! NO! NO! NO! NO! NO! NO! NO! NO! NO! NO! NO! NO! NO!
Your loop sets $line (but not $_),
but your RE checks $_ (but not $line).
There are two solutions to yo
Scott Lutz wrote:
> There are Perl development GUI's available, ( I saw one, once in
> passing, way back ), but mostly development is done with a text editor.
> You can go to www.activestate.com and get VisualPerl if you so wish.
>
> Once you get past the initial first script, a simple
> %perl
There are Perl development GUI's available, ( I saw one, once in
passing, way back ), but mostly development is done with a text editor.
You can go to www.activestate.com and get VisualPerl if you so wish.
Once you get past the initial first script, a simple
%perl program_name.pl
or
%./p
I noticed gd.pm (version 1.15) is located at:
/usr/lib/perl5/site_perl/5.005/i386-linux/GD.pm
I need 1.3.7
Basically, it's an upgrade, and I will install (linux)
from source. The question is, though, since I only found the GD.pm files and
no other accompanying files that usually come in a Gdpm
Michael McQuarrie wrote:
>
> Hello all. Can't figure this out...I execute the following scipt and the output of
>the KSH pipe
> is placed at the top of the log file instead of in order of when it was executed.
> ---
> Script looks like thi
This goes beyond the scope of these scripts, but I've found some
autoflushes to be less than perfect in all situations...
I perfer to name pipes/handles and clamp them shut occasionally. That way
I can ensure flow (at least outward) in .pl scripts. This is especially
useful when a couple of di
How can I (actually whats the best way?) upgrade an existing Perl(5.6.0)
to (5.6.1). This is on RH7.2.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mariana añez wrote:
>
> I wrote this two scripts (to do "./mynum | ./mycount" on linux shell):
>
> mynum:
>
> #***
> # Write a number from 1 to oo
> #**
>
>
Guys:
This is a VERY basic question. I'm in the process of getting Redhat 7.2
Linux which had Perl bundled with it. After I get Linux setup, how do I
'use' Perl ? I'll explain.
When I install Visual Basic I hit a shortcut and in I go. I can create
apps with the project manager as I'm sure yo
On Jan 2, John W. Krahn said:
>> I want to compare between two arrays.
>> $a = (join " ",@a);
>> $b = (join " ",@b);
>> if ($b eq $a) { print "equal";}
>
>Well you _can_ do this in one line. :-)
>
>$ perl -le'@a = qw(one two three four); @b = qw(one two three four);
>print "equal" if "@a" eq "@b
Amit Nisim wrote:
>
> Hi All,
Hello,
> I want to compare between two arrays.
> How can I do it ?
>
> One way I know is :
>
> $a = (join " ",@a);
> $b = (join " ",@b);
> if ($b eq $a) { print "equal";}
Well you _can_ do this in one line. :-)
$ perl -le'@a = qw(one two three four); @b = qw(o
On Jan 2, Booher Timothy B 1stLt AFRL/MNAC said:
>Why is ((/^\*+/) or (/^\s*$/)) improper?
>
>It breaks down to:
>( (/^\*+/) or (/^\s*$/) )
Yes... but neither of those are testing $line, they're testing $_.
>How is this different than: "next if $line =~ /^\*+/ or $line =~ /^\s*$/;"
>except tha
Why is ((/^\*+/) or (/^\s*$/)) improper?
It breaks down to:
(
(/^\*+/)
or
(/^\s*$/)
)
How is this different than: "next if $line =~ /^\*+/ or $line =~ /^\s*$/;"
except that it is less ambiguous?
tim
On Jan 2, Booher Timothy B 1stLt AFRL/MNAC said:
>First of all, why do I need to use defined() here is my code:
You don't.
>next if $line =~ ((/^\*+/) or (/^\s*$/));
That isn't written properly.
next if $line =~ /^\*+/ or $line =~ /^\s*$/;
Although, the first regex can be simplified to
On Jan 2, [EMAIL PROTECTED] said:
>That's right. But let me add my 5cents to it. If you decide to use the
>construct "while ( )..." then it better be
>while( defined() ) {
>//...
>}
Not so. First, doing defined() does not store a line in $_ -- for
that, you'd need defined($_ = ). Second, whi
First of all, why do I need to use defined() here is my code:
#!/usr/bin/perl -w
#
open(MYFILE,'test2.txt');
$lNum = 1;
while (my $line = ){
chomp($line);
next if $line =~ ((/^\*+/) or (/^\s*$/));
@splitLine = split(/:\s/,$line);
print "$lNum\: \"$splitLine[0]\" And \"$s
On Jan 2, [EMAIL PROTECTED] said:
>open( MYFILE, "file.txt" ) or die;
>while ( my $line = ) {
>my ($a); // $a is undefined now.
>$line =~ /(\w+)\d+$/;
>$a = $1; // $a may be undef still if the preceding expression did not
>evaluate to true
>print "Value of a is <$a>\n"; // S
That's right. But let me add my 5cents to it. If you decide to use the
construct "while ( )..." then it better be
while( defined() ) {
//...
}
[sathish]
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 2:44 PM
To: Booher Timothy
Michael Simmons wrote:
>
> Does anyone see what the problem with this is?
>
> if ( $tline[$i] =~ /^$name\s/ ) {
> if ( $tline[$i] =~ /\scname\s/ ) {
> print "Found the following alias: \n";
> print "$tline[$i];
> }
> elsif ( $t
Could you tell what you do inside the while loop? If you declare local
variables and assign values to them from the contents read from file, then
chances are that the values read from the file are null and the variables
still unassigned.
For example,
open( MYFILE, "file.txt" ) or die;
while ( my
On Jan 2, Booher Timothy B 1stLt AFRL/MNAC said:
>Thanks so much - only one problem: when I try to use while (my $line =
>) { etc } I get a bunch of errors similar to this one:
>
>Use of uninitialized value at JustForTest.pl line 13, chunk 5.
>
>Do you know what I am doing wrong?
The code given
Thanks so much - only one problem: when I try to use while (my $line =
) { etc } I get a bunch of errors similar to this one:
Use of uninitialized value at JustForTest.pl line 13, chunk 5.
Do you know what I am doing wrong?
Thanks,
tim
Tim
Hey Tim,
This will check for lines that have nothing but white space in them and skip them.
White space
includes newlines as well...
Shawn
open(F,'file.txt');
while() {
next if(/^\s*$/);
blah...
}
close(F);
- Original Message -
From: "Booher Timothy B 1stLt AFRL/MNAC" <[EMAIL P
One way is to do this...
while ( my $line = ) {
next if ( /^\s*$/ );
}
Rob
-Original Message-
From: Booher Timothy B 1stLt AFRL/MNAC
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 5:19 PM
To: [EMAIL PROTECTED]
Subject: find blank line
When parsing a text file -
When parsing a text file - what is the best way to skip a "blank" line -
when I find the length I get a length of 1 (perhaps the newline). I know
that I could chomp($_) and then if(length($_) != 0) {do something} else
{next} but I feel that there should be a way to have an if($_ = $blank)
statemen
1) in 5 years the computers will be faster ... actually there is that law
that will tell you how much faster it will be ...
2) you can often get complex code to run faster by optimizing parts of code
that are your bottleneck ( threading, caching, reusable objects, iteration
vs recursion, etc ...
Hello all. Can't figure this out...I execute the following scipt and the output of
the KSH pipe
is placed at the top of the log file instead of in order of when it was executed.
---
Script looks like this:
--
Chosing the appropriate algorithm can make orders of magnitude of difference
in execution time.
There are many problems where the appropriate algorithm for a small data set
is inappropriate for a large data set, for example.
Perl does, indeed, provide many ways to implement something, and it does
> 2) I am not exactly sure what you mean by "profiled your Perl", however I
do
> do benchmarks on code. I am in the process of redesigning our website,
and
> thus taking this opportunity to improve upon old scripts that will need
> changing anyways. Current improvements to our main script have
Hello folks,
I am closing this thread. Although it is a very interesting conversation to
have with people, this really isn't the place for it. Feel free to continue it
off-list with interested parties, but consider this thread closed and do not
respond to the list itself. Thanks for your cooperat
Thank-you to everyone for the responses.
Roger,
1) I am personally obsessed with effeciency. This is why I am considering
moving to C or C++.
2) I am not exactly sure what you mean by "profiled your Perl", however I do
do benchmarks on code. I am in the process of redesigning our website, and
th
>I want to compare between two arrays.
This is what you want?
$fail = 0;
if (@a!=@b) {
$fail = 1;
} else {
for ( $i=0; $i<@a; $i++ ) {
if ($a[$i]==$b[$i]) { next; }
else { $fail = 1; last; }
}
}
if ($fail)
{ print "not equal\n"; }
else { print "equal\n"; }
Try
while () { <-- change
my $num = $_; <-- change
chop $num;
next if(!($num=~m/(^([0-9]+)$)/));
$sum=$sum+$num;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Mariana Añez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wedn
This might have been beaten to death today, but I'd like to add my $0.02:
1. You Linux guru says "C would be faster than Perl"? Prove it. Are there
any specific benchmarks? Probably not. Remember, assembly language is faster
than C!
2. Just this morning I wrote a 3 line Perl fragment to run a pr
Rob:
Thanks for all of your help. I hope to help others as soon as I get the
swing of perl more.
-Scott
On Wed, 2 Jan 2002, Hanson, Robert wrote:
> "Should I put a while in front of the line processing?"
>
> Yup.
>
> while ( my $record = ) {
> ...
> }
> close (NEWQUOTES);
> close (Q
"Should I put a while in front of the line processing?"
Yup.
while ( my $record = ) {
...
}
close (NEWQUOTES);
close (QUOTEP);
Rob
-Original Message-
From: Scott [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 2:50 PM
To: Hanson, Robert
Cc: [EMAIL PROTECTED]
Subject: R
Thank you for the reply. However, I get a broken image
I cannot avoid problems with text, it's really weird. Maybe the problem is I
need a full path to the font? I even tried '@font.ttf'. Should I install
ghostscript and only rely on those type of fonts? Do font paths need to be
full? it's stra
Ok, I think I have it opening the file correctly, now I want to create a
loop to process every record in the file. With the code below it does one
line and stops. Should I put a while in front of the line processing?
Thanks,
open(QUOTEP,"$qivQuoteFile");
open(NEWQUOTES, ">newtest5.txt");
> -Original Message-
> From: Hanson, Robert [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 02, 2002 2:21 PM
> To: 'Maciejewski, Thomas'
> Cc: [EMAIL PROTECTED]
> Subject: RE: C vs. Perl
>
>
> No flames from me.
>
> One of Perl's strong/weak points is that there are too many ways
last thought ... I think the point here is that in java you don't need two
processes
rather the servlet engine runs and spawns off threads as needed ... so you
can share the information freely between threads ...
I was wondering if this is possible in perl?
-Original Message-
From: Da
Wednesday, January 02, 2002, 7:06:34 PM, Maciejewski, Thomas wrote:
> how ?
> through CGI?
> can you post an example?
i can't say i've ever tried to build a perl with threading
enabled, but there's always lots of discussion on the mod_perl
mailing list about sharing data between processes. ta
1) my @line declares the array @line for the rest of the local block (ie for
the next line). It declares a new, and empty, array each time round the
while loop.
2) /=*([^=]+)/
a)=* zero or more equals signs [ Perhaps this should be =+ , that is,
one or more ... ]
b) [^=]+ one or more cha
There are many views on this.
1) Well designed and implemented C will be faster if the application is
CPU-intensive. Is this the case?
2) Have you profiled your Perl? Have you experimented with the Inline
module?
3) What is the expected lifetime of the code? Is it worth the additional
cost of dev
On Wed, 2 Jan 2002, Dean Theophilou wrote:
> Your quote is incorrect, from what I remember, that is. It's more like "a more
> wretched hive of scum and villainy" (sp?).
*shrug* My quotes come up completely randomly -- I have no control over
how accurate or not accurate they are. :-)
-- Brett
On Wed, 2 Jan 2002, Hanson, Robert wrote:
> I don't deal with IPC, so I can't give you an example off the top of my
> head. The perlfork manpage has a bunch of info though depending on what you
> want to do, and there are probably a bunch of modules out there as well to
> simplify the process.
On Wed, 2 Jan 2002, Maciejewski, Thomas wrote:
> heh ... again though in large groups ... this becomes a bit of a problem
> since you all have to kind of be in sync with coding styles and courteous
> coding
This is more a part of the software development process than it is the
responsibility of
Your quote is incorrect, from what I remember, that is. It's more like "a more
wretched hive of scum and villainy" (sp?).
Dean
-Original Message-
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 11:22 AM
To: Maciejewski, Thomas
Cc: 'Bob Showalter'; [EMA
I wrote this two scripts (to do "./mynum | ./mycount" on linux shell):
mynum:
#***
# Write a number from 1 to oo
#**
#!/usr/bin/perl
my $i=1;
while ($i
would it be rude to ask ya'll to take this thread elsewhere. this list is
so high-traffic already. if as a fledgling newbie i've overstepped any
bounds, my apologies.
tia,
ken
On Wed, 2 Jan 2002, Brett W. McCoy wrote:
> On Wed, 2 Jan 2002, Maciejewski, Thomas wrote:
>
> > not to get flam
I don't deal with IPC, so I can't give you an example off the top of my
head. The perlfork manpage has a bunch of info though depending on what you
want to do, and there are probably a bunch of modules out there as well to
simplify the process. I used one of those modules a long time ago when I
I am actually programming perl for work and am trying to learn it ...
-Original Message-
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 2:22 PM
To: Maciejewski, Thomas
Cc: 'Bob Showalter'; [EMAIL PROTECTED]
Subject: RE: C vs. Perl
On Wed, 2 Jan 2002
heh ... again though in large groups ... this becomes a bit of a problem
since you all have to kind of be in sync with coding styles and courteous
coding
I have seem cryptic java code ... but that is often from variables name
temp,a,b,a1,b1 etc ...
-Original Message-
From: Hanson, Rob
On Wed, 2 Jan 2002, Maciejewski, Thomas wrote:
> not to get flamed here but one of the reasons I dont like perl is that
> there are sometimes too many ways to do something ... and all of them
> are fairly cryptic ... people having different coding styles can really
> confuse the hell out of some
from the perl FAQ:
@array1 = (1..10);
@array2 = (5..15);
@union = @intersection = @difference = ();
%count = ();
foreach $element (@array1, @array2) {
$count{$element}++ }
foreach $element (keys %count) {
push @union, $element;
push @{ $count{$element} > 1 ? \@in
No flames from me.
One of Perl's strong/weak points is that there are too many ways to do
something... I agree with that. But it is up to the programmer to implement
solutions that make sense and are easy to maintain. I personally like
having the power to do what I need to do, which makes it my
agreed 100% ... but I think that perl lends itself to cryptic code where
java lends itself to order ... which is agreed is limiting in some aspects
-Original Message-
From: Brett W. McCoy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 2:08 PM
To: Maciejewski, Thomas
Cc: Ag
Hi All,
I want to compare between two arrays.
How can I do it ?
One way I know is :
$a = (join " ",@a);
$b = (join " ",@b);
if ($b eq $a) { print "equal";}
I am looking for better way.
thanks
amit
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTE
how ?
through CGI?
can you post an example?
-Original Message-
From: Hanson, Robert [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 2:09 PM
To: Maciejewski, Thomas; Agustin Rivera; [EMAIL PROTECTED]
Subject: RE: C vs. Perl
"One benifit to running java though ... is that
On Wed, 2 Jan 2002, Maciejewski, Thomas wrote:
> agreed that OO isnt always better but the point that I was trying to make
> was that I would rather build more structured code that is easier to
> maintain / debug than to worry about the internal speed of a program ...
> also wanted to point out t
"One benifit to running java though ... is that you can easily share
information between your threads"
Same with Perl.
Rob
-Original Message-
From: Maciejewski, Thomas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 2:02 PM
To: 'Brett W. McCoy'
Cc: Agustin Rivera; [EMAIL P
not to get flamed here but one of the reasons I dont like perl is that there
are sometimes too many ways to do something ... and all of them are fairly
cryptic ...
people having different coding styles can really confuse the hell out of
someone else that is trying to do some work with the code.
But then again Perl is OO if you want it to be, Perl supports fork for
spawning processes (better support in Unix than in Windows though), and the
original poster was running mod_perl so subsequent hits to a script are run
from already compiled code cached in memory.
So I don't see that porting t
agreed that OO isnt always better but the point that I was trying to make
was that I would rather build more structured code that is easier to
maintain / debug than to worry about the internal speed of a program ...
also wanted to point out that there are other aspects to the percieved speed
of a
> -Original Message-
> From: Maciejewski, Thomas [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 02, 2002 1:44 PM
> To: 'Brett W. McCoy'; Agustin Rivera
> Cc: [EMAIL PROTECTED]
> Subject: RE: C vs. Perl
>
>
> how about all of the issues involved with spawning off processes ...
>
On Wed, 2 Jan 2002, Maciejewski, Thomas wrote:
> how about all of the issues involved with spawning off processes ...
>
> in java servlets I know this is handled because the servlet is always
> running ...
You mean the servlet container is always running, like Tomcat.
> you may end up with a mo
you may want to move to servlets also since servlets (round trip and
depending on the ammont of processing going on) should run faster than perl
or c cgis
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 12:35 PM
To: [EMAIL PROTECT
how about all of the issues involved with spawning off processes ...
in java servlets I know this is handled because the servlet is always
running ...
you may end up with a more efficient system and easier to debug code and all
of the other benifits from OO ... pretty much all around better by
On Wed, 2 Jan 2002, Agustin Rivera wrote:
> Ok, the local Linux guru has proclaimed that C would be faster than Perl. I
> know C is very effecient so I don't really doubt him, but my question is
> would it make that much of a difference? I certainly wouldn't mind learning
> C, the only ques
If the file is too large, don't create a list of lines in memory.
You may have problems if you do it.
Instead, do
open(NEWQUOTES,"newquotes.txt");
open(OTHERFILE,">otherfile.txt");
while ($line=) {
chomp $line;
my @fields = map { $_ .= " " x (255-length($_)) } split(/,/,$line);
I personally think if you have working, secure scripts in Perl, and are
accustomed to maintaining them, then it is not worthwhile to port to C.
While it is faster, I think the time spent fussing with the porting, etc is
not worth it. If you really, really need more speed, I would suggest that
thr
--- Agustin Rivera <[EMAIL PROTECTED]> wrote:
> Ok, the local Linux guru has proclaimed that C would be faster than Perl. I
> know C is very effecient so I don't really doubt him, but my question is
> would it make that much of a difference? I certainly wouldn't mind learning
> C, the only q
Unless you have a specific script that uses a lot of CPU cycles, then I
doubt you will see substantial benefit. C is the obvious choice for image
manipulation and parsing structured data like XML. ...But since that is the
case you will notice that most of these functions can be accomplished usin
this is the ole flame war argument ...
the basis of this in my opinion is what do you need to be faster? I would
rather look for bottlenecks and optimize them than to optimize everything
depending on what you are doing C could be much faster
I am of the mindset to have clearer code and code
> "Zentara" == Zentara <[EMAIL PROTECTED]> writes:
Zentara> I found it in the demos for the Perl-magick module.
I have this theory that nobody ever codes PerlMagick from the docs,
which put plainly, suck. Everyone always starts with some example in
the demos, and then mutates it slowly, va
Ok, the local Linux guru has proclaimed that C would be faster than Perl. I
know C is very effecient so I don't really doubt him, but my question is
would it make that much of a difference? I certainly wouldn't mind learning
C, the only question is would be worth the time to port our Perl sc
>> print "$tline[$i];
You are missing a quote on all 3 of these lines, it should be:
print "$tline[$i]";
But there is probably no reason to have a single variable in quotes
alone, so I recommend this:
print $tline[$i];
Rob
-Original Message-
From: Michael Simmons [mailto:[EMAIL P
Does anyone see what the problem with this is?
if ( $tline[$i] =~ /^$name\s/ ) {
if ( $tline[$i] =~ /\scname\s/ ) {
print "Found the following alias: \n";
print "$tline[$i];
}
elsif ( $tline[$i] =~ /\sa\s/ ) {
p
Ok, do you recommend I open the file and create a list of the lines in
that file? Example below on how I did the comma seperate list:
open(QUOTE2,"$QuoteFile");
open(NEWQUOTES, ">>newquotes.txt");
while ($line = )
{
$line =~s/\t/,/g;
print NEWQUOTES "$line";
}
close (NEWQUOTE
Rob:
That's me -- overthinking things again! Thank you, I am going to work on
this now.
-Scott
On Wed, 2 Jan 2002, Hanson, Robert wrote:
> You could do something like this (including the comma delimeter)...
>
> # a sample record
> my $record = "blah1\tblah2\tblah3";
>
> # split by tab
You could do something like this (including the comma delimeter)...
# a sample record
my $record = "blah1\tblah2\tblah3";
# split by tabs
my @fields = split( /\t/, $record );
for (my $i = 0; $i < @fields; $i++ ) {
# add 255 spaces to the field
$fields[$i] .= " " x 255;
Hey Joel,
Here is a script I made a couple of years back where I DID use another font...
Shawn
#!perl -w
use GD;
use GD::Text::Wrap;
&make_message;
exit;
sub make_message {
open(PNG,"button.png") or die print "Can't open button.png: $!\n";
$map=newFromPng GD::Image(PNG) or die print "C
Hi:
I am developing a input routine in perl that will take a SQL exported file
in tab delimited format and convert it to something that our mainframe can
process. The file will ultimately have 255 characters for each field.
I have been successful in replacing the tabs with comma's, but now
On Tue, 1 Jan 2002 23:03:42 EST, [EMAIL PROTECTED] wrote:
>The problem? After I created a working script where it creates 'button.png'
>and views it, I try to add text to it, and no changes take affect. Without
>that one line that adds text (Or should) the script is perfect. I don't want
>it ch
> -Original Message-
> From: KeN ClarK [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, December 30, 2001 9:25 PM
> To: [EMAIL PROTECTED]
> Subject: redirect to URL[linux,apache]
>
>
> 1. I'm VERY new.
> 2. I have the Perl Cookbook & Learning Perl.
> 3. I can't figure this out, and searches on
> "Richard" == Richard S Crawford <[EMAIL PROTECTED]> writes:
Richard> I have a directory containing over 250 HTML files. What is the best
Richard> way to extract the title (between the and tags) of
Richard> each file without having to open the file and read in the contents,
Richard> which
> -Original Message-
> From: Steven Bach [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 29, 2001 7:28 PM
> To: [EMAIL PROTECTED]
> Subject: open URL as stream with LWP?
>
>
> Is there a way to open a URL with LWP so that it becomes
> something like
> a filehandle so that I can d
HAPPY NEW YEAR EVERYONE
First you must do a kernel compilation adding NTFS as a file system
Second you have to add the NTFS device in the SAMBA configuration
file.
-Original Message-
From: nafiseh saberi [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 01, 2002 2:09 AM
To: [EMA
Ahmed Moustafa wrote:
>
> I've tested reading and writing from the same file and it didn't work. I
> think that can't be done in any language.
Like I posted on Monday. :-)
perl -pli -e's/$/\@minime.com/' yourfile.txt
Also, read the entry for open() in the perlfunc document and the
perlopent
Rory O'Connor wrote:
>
> Is there any way to automatically URL-encode strings with Perl?
> MSIE does this automatically, but I noticed that Konqueror does not.
Maybe one of these will help.
http://search.cpan.org/search?mode=module&query=url
John
--
use Perl;
program
fulfillment
--
To unsu
hi dear team...
happy new year...:))
do you have more info about SAMBA and
how I can use it ??
thx.
Sincerely yours Nafiseh Saberi
People will forget what you said ...
People will forget what you did...
But people will Never Forget
how you made them fee
"Richard S. Crawford" wrote:
>
> I have a directory containing over 250 HTML files. What is the best way to
> extract the title (between the and tags) of each file
> without having to open the file and read in the contents, which seems like
> it would be very slow?
The only way you can read t
You need to open the file, save the contents in memory, then close the file.
Now re-open the file for writing and print the saved contents to it making
the changes as needed. This is fine for non crictical files that are small
(once you open the file for write, it's contents are deleted so if your
Is there any way to automatically URL-encode strings with Perl? MSIE does this
automatically, but I noticed that Konqueror does not.
Thanks!
Rory
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Leon,
I've tested reading and writing from the same file and it didn't work. I
think that can't be done in any language.
Leon wrote:
> - Original Message -
> From: "Ahmed Moustafa" <[EMAIL PROTECTED]>
> Newsgroups: perl.beginners
> To: "Leon" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECT
I have a directory containing over 250 HTML files. What is the best way to
extract the title (between the and tags) of each file
without having to open the file and read in the contents, which seems like
it would be very slow?
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buff
"Hubert Ian M. Tabug" wrote:
>
> Given that $a = `1234 abcde abdcd acbd`;
^ ^
So you are running the program "1234" and want the output in $a or are
the back-quotes a typo?
> Would anyone know of of a way for me to just
> "extract" the numerical
1 - 100 of 101 matches
Mail list logo