Steven Massey wrote:
> Hi all
>
> perl script below works, and does what I hoped it would, but I don't seem
> to understand how to get it to print out the result to a new file as
> opposed to stdout.
>
> Thanks for any help
>
> #!/usr/bin/perl -w
> use strict;
> use HTML::Parser;
>
> open(OUT,
> #!/usr/bin/perl -w
>
> use strict;
>
> my @array = ('', 0, "", 1);
>
> my $hasTruth;
> foreach (@array) {
> if ($_ ){
> $hasTruth = "yezzindeedydo!";
> last;
> }
> }
> if ($hasTruth) {print "$hasTruth has truth\n";}
> else {print "Does not have truth";}
>
>
> Joseph
#!/usr/bin/
>> foreach $AddrToCheck (@AddrArray) {
>
> Beware that at this point you may well still have newlines
> at the end of each record. Make sure you have 'chomp'ed
> each record, otherwise it won't validate as an email
> address.
>
> Also, the easiest way to put all the lines from a file
> into an a
Rob Dixon wrote:
>> > I'm having problemsdue (i suppose) to the special chars in the
>> > $var1 string the s/// don't match anything.
>> > What can I do to?
>>
>> s{\Q$var1\E}{$var2} is usually what you want, except that may very
>> well 'quote' out the $ in $var.
>
> I guess you mean $var2?
w Subject:
line. ;-)
does this make any sense or should I e-mail you a screenshot of what I mean
so you can *see* it ? :)
> Second, Scott...you are great!...I solved my problem with your suggestion.
> Thank a lot...this is a great mailing list!!!
Wheee, glad I was able to help :)
--
To uns
Rob Dixon wrote:
>> you want to know what's failing, right?
>
> Wrong. John was just pointing out that $1 would remain
> defined from a previous regex match in my previous post.
> This would mean that there was no way of telling in
> retrospect if the match had suceeded. The context of
> the prob
Francesco Del Vecchio wrote:
> suppose this:
> ==
> $string 'I saw Roger and I said :roger? what the @*$!';
>
> $var1 = "roger? what the @*$!";
> $var2 = "Hi roger...nice to meet you";
>
> $string=~ s/$var1/$var2/;
> ===
>
Dan Muey wrote:
>> ([EMAIL PROTECTED](/home/dmuey):101)# perl -MCPAN -e shell;
>>
>> cpan shell -- CPAN exploration and modules installation
>> (v1.48) ReadLine support available (try ``install Bundle::CPAN'')
>>
>> cpan> relaod index
>> Unknown command 'relaod'. Type ? for help.
>>
>> cpan> r
Dan Muey wrote:
> I've also had trouble using CPAN and so I did the reload index
> mentioned in this thread and that seemed to go thought but I s
> til can't get it to go.
>
> It's the same error everytime ( diff module names of course ) :: could not
> open y... There is a direct
> perl -MCAPN =e
Rob wrote:
> Is there a perl command to list installed modules?
#!/usr/bin/perl
use warnings;
use strict;
foreach my $mod ( sort CPAN::Shell->expand("Module","/./") )
{
next unless $mod->inst_file;
print $mod->id;
print ": ", $mod->inst_version
if $mod->inst_version;
pri
Rob Dixon wrote:
> Paul Johnson wrote:
>> Rob Dixon said:
>>
>> > $data =~ m/ <([^>]*)> /x;
>> > my $newdata = $1;
>>
>> And if the match fails?
>
> Well I think it's likely that you'd want to do:
>
> $data =~ m/ <([^>]*)> /x or die "Malformed data";
>
> or at least:
>
> $data
David wrote:
> Gregg R . Allen wrote:
>
>> It was close but what I got is : "JohnDoe.com" Instead of
>> "[EMAIL PROTECTED]".
>>
>> I think it has something to do with escaping the "@" sign. I've been
>> experimenting, but without much luck.
>>
>
> that's because Perl thinks @Someplace is an
John W. Krahn wrote:
>> ($_pattern, $_start) = (shift, shift);
>> print "Starting search at: $_start\n";
>>
>> chdir "$_start";
>
> Useless use of quotes. You should verify that chdir worked.
>
> unless ( chdir $_start ) {
> print STDERR "Cannot chdir to $_start: $!";
> exit 1;
> }
I need to make an HTML page that lists all files and directories and then
links to them.
The following script, with a subroutine, looks like what I need. I should
just need to add some html tags to the Print statements.
Does that sound right to you all? Or do you have better suggestions? (I'm a
r
Aimal Pashtoonmal wrote:
> Hello,
>
> I have the script below giving the folowing error meesages.
>
> =>Useless use of string in void context at
> extract_data_from_IPR_HMM_libs.pl
> line 12.
> =>Useless use of a constant in void context at
> extract_data_from_IPR_HMM_libs.pl lin
George P. wrote:
[snip]
>> > I noticed that you've said
>> > "open () or die()"
>> > and
>> > "close() or die()"
>> >
>> > If open fails, the program will kill itself, so
>> > the close function will never be called.
>> > Therefore there is no need to say "close() or die()"
>>
>> I don't follow t
George P. wrote:
> I noticed that you've said
> "open () or die()"
> and
> "close() or die()"
>
> If open fails, the program will kill itself, so the close function
> will never be called.
> Therefore there is no need to say "close() or die()"
not true.
> You've done it thrice in this email, so
John W. Krahn wrote:
> "Scott R. Godin" wrote:
>>
>> use Quantum::Superpositions;
>>
>> my @notinarray1 =
>> map { $_ }
> ^^
>
>> eigenstates( any(@Array2) ne
Johann Snyman wrote:
> Hello there,
>
> I am a newby trying to learn pearl. I wrote my first little script,
> and I would love to se where I could have done things better (in a
> more proffesional way).
>
> Feedback would be appreciated!
Well you are off to a good start with lines two and three
Randal L. Schwartz wrote:
[snip]
> John> Use the File::Find module.
>
> John> perldoc File::Find
>
> I have many examples of this module (including a two-parter that
> recently appeared in Linux Magazine) on my site. Google
> for
>
> site:stonehenge.com "File::Find"
>
> for the examples.
Philipp Gruemmer wrote:
> A small correction (thanks to Carlos Diaz)
>
>> Isn't shis code supposed to read the first line of the @input array then
>> read the first line of the @blacklist array, see if the $line contains a
>> $cond and then ptrint "true". After that it should carry on with the
>>
Todd W wrote:
>
> "Paul" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> This is too fun, and so occupies far to much of what should otherwise
>> be a productive workday.
>>
>> Alas, I must unsubscribe again.
>>
>> *sigh*
>>
>> Later, all. :)
>>
>
> You can point your news reade
Dave K wrote:
>
>> Greetings!
> Hello
>>
>> I'm trying to do some Perl for a non-profit organization. The computer
>> administrator doesn't know very much about Perl or about the server.
>> If I were to ask him what Perl modules were available, he'd probably
>> just have to call somebody else an
print "$dbname, $dbemail, $dbpwd, $dbusrname\n";
# or whatever you want to do with these vars.
}
$dbh->disconnect( );
}
else { print "Need Drivers for MySQL!\n"; }
-
Hope this helps you get to where you want to be.
Scott.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 09:42 PM 3/1/2003 +, Anadi Taylor wrote:
Thank you - this helps a lot - its good to also know that the SQL problem
I was having is a mySql thing - not me !
That may be true, I not too sure though. You never did disclose how you
are using Perl to build the SQL command and send it to th
ad installation
problems:
RPC::PlServer DBI
Any one know what's going on, or if there is a better place for me to ask
this, or a FAq that I have over looked. I'm having a very hard time
tracking this down, and suggestions would be great.
Thanks.
Scott.
--
To unsubscribe, e-ma
Hi,
I've searched far and wide for this with no success. Is there a win32 perl module with
the same functionality as the win32 'xcopy' command, i.e. that will recursively copy a
directory structure from one place to another?
Thanks,
Scott
--
To unsubscribe, e-mail: [EMAIL
on
the database table (like all good tables should have anyway)
and you're done. (Or if the "duplicate" criterion involves
some other column, put a UNIQUE constraint on it.) Then all
inserts of duplicate records will fail automatically. Just
make sure that RaiseError
Does anyone know where I can get a script that looks into the contents of a
directory and outputs the contents of the directory into a list that is
displayed on an HTML page? (Also, the names should contain hyperlinks to
those contents.)
Or, how would I do this?
Thanks!
Deborah
start? I'm thinking maybe there is a file
locked or socket or some such, but I just don't know where or what. I
don't think this error message is giving the truth, according to the lines
near 200 in Dynaloader.pm.
FirebirdSS is working just fine, and Perl seams to work as long as
I think I am going to move this over to the CGI list!
:o)
Scott Lutz
Pacific Online Support
Phone: 604.638.6010
Fax: 604.638.6020
Toll Free: 1.877.503.9870
http://www.pacificonline.com
-Original Message-
From: Scott Lutz
Sent: February 17, 2003 4:58 PM
To: [EMAIL PROTECTED]
Subject
7;https://domains/perl/reg_system.cgi', [
domain => $q->param("domain"),
affiliate_id => $q->param("affiliate_id"),
action => $q->param("lookup"),
]);
}
Please do not hesitate to contact me directly i
Check CPAN. Quite probably some operations that your scripts spend
hundreds of lines performing can be replaced with a single call to a
module. Point out the benefit of using code maintained by someone else;
use the phrase "make or buy".
Slap all that into a PowerPoint presentation and you
This is how I've done this for my scripts:
do "/filename";
Then I just call the sub in the normal method.
-Original Message-
From: Jamie Risk [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 2:11 PM
To: [EMAIL PROTECTED]
Subject: including subroutines from other files ...
undef - look up autovivification).
<=> puts its arguments in scalar context, hence we are comparing number
of elements in each array, and since $b is on the left hand side we get
descending order.
I'll leave the rest to your further reading.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
nce I decide on where
to output, I'd like to write a script that will graph the results of this
command.
If you've done anything like this, I'd greatly appreciate the assistance.
Thank you,
Joshua Scott
Security Systems Analyst
7;d really like to avoid having
to require a Windows machine just for this. Am I better off just doing this
from a Windows box?
Thanks you in advance for any assistance.
Joshua Scott
Security Systems Analyst, CISSP
62
>To make this work, you have to specify the list variable ($i):
>$file = "/suidbin/sendmail -t";
>$var = "the_file.txt";
>
>open(FILE, "$var") || die "cant open text file";
>@file = ;
>close(FILE);
>foreach $i (@addressee) {
> open(MAIL, "|$file $addressee") || die "can't open sendmail";
>
>
>if your file is a text file
>
>#! /usr/bin/perl -w
>
>$file = "/suidbin/sendmail -t";
>$var = "the_file.txt";
>
>open(FILE, "$var") || die "cant open text file";
>@file = ;
>close(FILE);
>
>##open pipe to sendmail
>open(MAIL, "|$file") || die "cant open sendmail";
>print MAIL "To: blah\@devn
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Rob Dixon) writes:
>Peter Scott wrote:
>> Anyway, here's a way that doesn't require keeping more than 12 lines
>> in memory and doesn't require reading twice:
>>
>> $^I = ".bak";
>
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (R. Joseph Newton) writes:
>Peter Scott wrote:
>
>> I$^I = ".bak";
>> my @queue;
>
>Hmmm.
>
>push (@queue, $somevar);
>somevar = pop(@queue);
>
>...and double-H!
>
>Could it be that
e (<>) {
push @queue, $_;
print shift @queue if @queue > 12;
}
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I asked this before, but I probably made the question too long and confusing
to follow.
How do I send an email using perl?
The path for the sendmail program is:
h:/blah/blah/SENDMAIL/sendmail.exe
I want it to open the contents of a particular file. Then send the contents
of the file as a
Wow, this is kinda freaky Usually my perl email goes directly into a
"perl" mail directory, but your two emails just popped into my work-inbox.
I was just now starting to test a script for sending mail that works
perfectly on a unix machine, but isn't working correctly on an NT server.
That's
Hi Again,
Never mind I was looking at the Perl Dev Kit, which is an evaluation.
Scott Barnett
Home Care Medical - Technical Support Specialist
1-800-369-6939
1-262-786-9870 ext.214
E-Mail [EMAIL PROTECTED]
Confidentiality Notice: This e-mail message, including any attachments, is for the
sole
Hi All,
Is there a free version of Perl that I can get that will run on Win98 machine. I want
to start learning Perl. checked ActiveState but it looks like that is only a 15 or 30
day evaluation, I may be wrong?
Thanks,
Scott Barnett
Home Care Medical - Technical Support Specialist
1-800-369
I figured regular expressions where the solution but I'm just starting to
learn how to use regular expressions.
Also, only the first field always has a comma between the quotes. The other
fields are not consistent.
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
-Ori
;
The problem is with the fields that contain the commas between the quotes.
It's splitting the fields at each of these fields as well and I'd like to
know how to avoid that.
Any help is greatly appreciated
and voila.
Thanks to everyone who posted comments.
Joshua Scott
Security Systems Analyst, CISSP
-Original Message-
From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 7:04 AM
To: [EMAIL PROTECTED]
Subject: RE: Perl Subroutines
From: "Scott, Joshua&quo
;> > to titlecase.
>Try
>$title =~ s/\b(\w+)\b/\u\L$1/g;
The \b are redundant in that regex.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I thought I understood the answer, but I need more details.
What exactly would I enter if I want a program to find the epoch time for
midnight each night? I know how to find "current" time and date in both
"human" time and epoch time.
I want to generate a report that displays the events that are
Wow, that was really easy! Thank you very much for your help!!
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 5:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Perl Subroutines
Hi
le
without modifying the subs code.
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
-Original Message-----
From: Scott, Joshua
Sent: Thursday, January 09, 2003 4:07 PM
To: [EMAIL PROTECTED]
Subject: Perl Subroutines
I've created a group of Perl subroutines to handle t
};
I call the sub from webpages the standard way.
I sure hope I explained this clearly. I'm still getting used to Perl.
Thank you for any help you can provide!
Joshua Scott
==
NOTICE - This communication may
Yes, I think so. THANKS! This is a great fantastic group. Glad I found it.
>Have got what you need yet?
>Wags ;)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Here's the txt file. Thanks!
-Original Message-
From: Wagner, David --- Senior Programmer Analyst --- WGO
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 2:32 PM
To: Scott, Deborah; [EMAIL PROTECTED]
Subject: RE: Help with end-time start-time sorting problem
I have a txt data file that has several fields. Two of the fields are start
time and end time (listed in epoch time).
I need to write a perl program that finds (and prints) events that occur
between midnight "last night" and "midnight tonight."
First problem:
The date for midnight "last night" a
At 06:16 PM 1/7/03 -0600, Christopher D. Lewis wrote:
>On Tuesday, January 7, 2003, at 11:19 AM, Peter Scott wrote:
>
>>[responding to replacement of sub displayResults with {print __LINE__
>>. " sub displayResults";}]
>>That needs to be __LINE__, not __line__
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Christopher D . Lewis) writes:
>
>On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote:
>
>> [EMAIL PROTECTED] (Christopher D . Lewis) writes:
>>> My problem is that the errors Perl coughs up end with:
&g
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Christopher D . Lewis) writes:
>
>On Tuesday, January 7, 2003, at 10:31 AM, Peter Scott wrote:
>
>>
>> What line numbers do your text editors say the above statements are
>> actually on?
>>> the erro
count ends at 304.
>
>Ideas?
What line numbers do your text editors say the above statements are
actually on?
Sprinkle a few
print __LINE__;
statements around and see what Perl thinks the line numbers are.
This program hasn't been near a Windoze system, has it? Check
I need some pointers as to why the Storable module won't compile on my Intel/Debian
machine.
I am not sure if recompiling DynaLoader would help, so if any one has any ideas, I
would be most grateful.
This has failed using both CPAN and using the older 2.05 version I have.
Here is the complete ou
use. I haven't actually done sorting in queries there,
but you'd use setSort() to define the sorting order and then query() to get
the results in that order.
N.B. For a "new" Perl user, this is pretty advanced stuff. *Make sure* you
get some instruction or educatio
le '@x = gethostbyname("cnn.com"); \
print inet_ntoa($_) for @x[4..$#x]'
64.236.24.20
64.236.24.28
64.236.16.20
64.236.16.52
64.236.16.84
64.236.16.116
64.236.24.4
64.236.24.12
--
Peter Scott
other than \n
greedily (this is superfluous), plus 1 or 2 non-digits, 1 or 2 digits, 0 or 1
white space characters, a digit, and 2 non-digits, followed by 0 or more white
space characters (also superfluous).
Ponder the meaning of "non-" for a bit and then chew on this:
/([A-Z
chine . . .
;o|
Here is the error that gets returned when trying to run the module :
perl: relocation error: /usr/lib/perl5/auto/DBD/mysql/mysql.so: undefined symbol:
perl_get_sv
Any thoughts?
thanks in advance!
scott
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
Oops, Meng pointed out that the print method is inherited from Mail::Internet
where of course it is documented. I suggested instead that the inheritance be
documented a bit more clearly.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
thod, "print". So you can do
$mail->print(\*STDOUT);
Of course you shouldn't rely on undocumented methods being around forever,
but in this case I think it was left out by accident; I'll copy the author.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
7;t visible in %main::. You need the PadWalker module
from CPAN to list them.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
. How should the input file be opened (as a text file or binary)?
Text.
>2. Do all lines have to have the same length?
No.
>3. Once I get the return line position (if I get that far), how do I retrieve the
>line?
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe,
;to rely solely on my skillz and books. E-mail me direct if you have an idea,
>as of this e-mail I am unsubscribed.
>
>(no I don't want to do the digest because it's not as fun!)
Use the NNTP interface via news.perl.org. I switched all my perl.org
mailing lists to that se
Change that line from : use Win32:ODBC;
to : use Win32::ODBC; (note the double colon)
-Original Message-
From: Angel Iliev Kafazov [mailto:angel.kafazov@;mail.bg]
Sent: November 9, 2002 10:38 AM
To: [EMAIL PROTECTED]
Subject: ?:failure notice
Hi,
I am trying to write a scipt wh
Never mind.
A small case of the Mondays :o)
scott lutz
-Original Message-
From: Scott Lutz
Sent: November 8, 2002 10:37 AM
To: Beginners (E-mail)
Subject: removing modules
Does anyone have experience with removing modules installed using CPAN?
A Debian machine seg faults everytime I
Does anyone have experience with removing modules installed using CPAN?
A Debian machine seg faults everytime I try to install a module, and so I want to try
to remove the Compress::Zlib module.
Thanks for the help!
scott lutz
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
PM
>To: [EMAIL PROTECTED]
>Subject: RE: Declaring a Hash
>
>
>In article
><[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Colin Johnstone) writes:
>>Here is how you declare hash.
>>
>>my %hash = ();
>
>The "= ()" is entirely redundant. Just "
the letters m,y,s,i,t,e,c,o,m are
redundant with the \w.
You need to understand character classes.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Colin Johnstone) writes:
>Here is how you declare hash.
>
>my %hash = ();
The "= ()" is entirely redundant. Just "my %hash" does exactly the same
thing.
--
Peter Scott
http://www.perldebugged.com
--
To un
l" 3rd ed (Schwartz & Phoenix) and
at least one book about CGI programming (e.g., "CGI Programming with Perl",
Meltzer & Michalski).
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Change your open line to read as follows:
open (IN,"$file1") or die("Cannot Open: $!");
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
-Original Message-
From: Johnstone, Colin [mailto:Colin.Johnstone@;det.nsw.edu.au]
Sent: Wednesday, November 06, 2002
ve gotten wonderful help
from this group. Don't know what I'd do without you!
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
==
NOTICE - This communication may contain confidential and privi
How exactly could I accomplish combining the values? Forgive me, I'm still
a little wet behind the ears using Perl.
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
-Original Message-
From: LRMK [mailto:lrmk@;rakhitha.cjb.net]
Sent: Tuesday, November 05, 2002 9:18
I figured it out already! I ran a replace on the dst_port and replaced it
with a whitespace which threw off the count. I've modified it to delete the
whitespace and all works perfect.
Joshua Scott
Security Systems Analyst, CISSP
626-568-7024
-Original Message-
From: Scott, J
Hello all,
I've got a file which contains ports and hostnames. I'd like to count the
number of instances that each item occurs in my file. I'm having a
difficult time with this.
This is my script: Basically I'm splitting the first line a few times to
get the data I need. What am I doing wro
print DFILE; next OUTER };
}
s/A/?/;
}
If it weren't for the fact that sometimes you increment two variables I'd
have used a hash for the increments instead. Might still be better to have
a hash instead of all those little variables.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 08:06 AM 10/31/02, you wrote:
One way.
? Of the 3 fields which is unique field..I'll assume FuelCrd..
after ..print "$FuelCrd, $TrkID, $FuelCmp\n"; .insert
this
my ($check) = $dbh->selectrow_array ("SELECT fuelCrd FROM cardlock WHERE
fuelCrd = ?", undef,$F
d first record in table where id = 'blah'
if not available record then create record.
assign values to record.
Cheers.
Scott.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Dan, you might want to post the line in which you call config.cgi.
Are you using 'require'?
cheers,
scott
-Original Message-
From: Palm Optins [mailto:bootscat@;bellsouth.net]
Sent: Wednesday, October 30, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: Mail Problem
Importance: Hi
script in bash and c
>> shell depending on an argument.
>>since my default shell is bash the commands i give work.
>>but for c shell the set of commands don't execute.
>>i mean the subsequent commands after i go to c shell (system
>> "csh";) doesn't work.
>>
>>any suggestions???
>>thanks u
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
y /tmp]$ cat Bar.pm
package Bar;
require Exporter;
use strict;
@Bar::ISA = qw(Exporter);
@Bar::EXPORT_OK = qw(bar);
sub bar { print "$_[0]: Bar::bar\n" }
1;
[peter@tweety /tmp]$ ./prog
>From main: Foo::foo
>From Foo::foo: Bar::bar
>From main: Bar::bar
[peter@tweety /tmp]$
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
w(testvolts testamps testohms);
>
>You don't need to qualify these variables with package names.
You do if you've got a use strict higher up. I know the posting didn't
have that, but it's a good idea nonetheless. Although I'd be more inclined
to say
t;@values = (12398712984, 19286192879);
>>$hashofarrays{'family'}{'arrayref'} = \@values;
>>$hashofarrays{'family'}{'scalar'} = 12938712938;
>@combined = map { @{$_->{arrayref}||[]}, exists $_->{scalar} ? $_->{scalar}
>: () }
> values %hashofarrays;
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
url\n" if ($VERBOSE);
print "$resstring\n" if ($VERBOSE);
# Check the outcome of the response
if ($res->is_success) {
my $content = $res->content;
$content =~ m/.* ([0-9]+)<\/b>.*/s;
my $traffic = $1;
do both at once?
>I'm guess I could do it using a conditional that checks the hash value and
>executes one of the above statements as I iterate through the hash keys, but
>if theres a better way...
@combined = map { @{$_->{arrayref}||[]}, exists $_->{scalar} ? $_->{scalar} : () }
values %hashofarrays;
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I predict that if you insert
BEGIN { $|=1; print "Content-type: text/plain\n\n" }
after the #! line of that script, you will see something illuminating when
you next visit it through a browser.
If you still get a 500, then most likely the file permissions are wrong.
--
P
There is an on-line forum for people who have read
Damian Conway's book, at
http://www.manning.com/getpage.html?project=conway&filename=forum.html
And anyone who is serious about OO Perl will read that book.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mai
% perl -MSome::Module -e 0
Absence of output indicates the module is installed.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ss.pm
Only you'll be using the priority, not the niceness.
--
Peter Scott
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
AIL PROTECTED]/msg33969.html for a recent
>discussion on that.
It's an indirect filehandle syntax, which is close. There's some interesting
stuff here:
$ perldoc -q indirect
Found in /usr/lib/perl5/5.6.1/pod/perlfaq5.pod
How can I use a filehandle indirectly?
[...]
--
In article <005c01c27168$5c6c15c0$0924fea9@spy>,
[EMAIL PROTECTED] (Josimar Nunes De Oliveira) writes:
>I´m a beginner with perl and I need to find the DBI.pm module for Win32.
>Does anybody know where I could find it?
C:\> ppm
PPM> install DBI
--
Peter Scott
http://ww
be enormous, I
>do it without the block. However, I think print(FOO @list) looks really
>odd, so I'd probably do
>
> (print FOO @list), next if $condition;
The parens feel funny to me. I usually write this as
print FOO @list and next if $condition;
--
Peter Sco
701 - 800 of 1462 matches
Mail list logo