At 9:58 PM -0700 7/9/09, Travis Thornhill wrote:
I'm trying to learn to develop Perl modules in an effort to have
clean directory structure and more reusable code.
I'm hitting a little snag in my test code that I don't quite
understand. I'm hoping someone can help explain where I may be going
On Fri, Jul 10, 2009 at 00:58, Travis
Thornhill wrote:
snip
> Can't locate object method "new" via package "myMod" (perhaps you forgot to
> load "myMod"?) at uses_Mod.pl line 11.
snip
> my $obj = myMod->new(); # <- THIS IS THE LINE THAT ERRORS
snip
> package Mod::myMod;
snip
The package is na
I'm trying to learn to develop Perl modules in an effort to have clean
directory structure and more reusable code.
I'm hitting a little snag in my test code that I don't quite understand. I'm
hoping someone can help explain where I may be going wrong here.
The error I'm receiving is this:
ln0
On Thu, Jul 9, 2009 at 15:18, Umar Draz wrote:
> Dear User!
>
> I want to get all telephone and mobile number from a string and save into a
> variable. Here is my example what i am doing.
>
> #!/usr/bin/perl
>
> $str = "This is my string my mobile number is 0300-4459899, 042-8494949
> 041-8580880
Umar Draz wrote:
> Dear User!
>
> I want to get all telephone and mobile number from a string and save into a
> variable. Here is my example what i am doing.
>
> #!/usr/bin/perl
>
> $str = "This is my string my mobile number is 0300-4459899, 042-8494949
> 041-8580880 now the string is complete
Dear User!
I want to get all telephone and mobile number from a string and save into a
variable. Here is my example what i am doing.
#!/usr/bin/perl
$str = "This is my string my mobile number is 0300-4459899, 042-8494949
041-8580880 now the string is complete"
while($line =~ /(([0-9]{3,4}[-]?
> "Eric" == Eric Veith writes:
Eric> sudo perl -e 'open($fh, "<", "/tmp/foo"); @f = <$fh>; close($fh);
open($fh,
Eric> ">", "/tmp/foo"); foreach(@f) { s/^(Key1=).*/$1NewValue1/; print $fh $_; }
Eric> close($fh);'
Eric> As always, TIMTOWTDI.
Much easier way is in-place editing:
perl -pi.ba
A config file in /etc is just another "data" file.
Your problem has nothing to do with Perl itself, as it seems. You need to
look up how to configure your web server to allow suexec for a script. And,
normally, it is not a good idea to let the webserver edit files in /etc,
but you'll probably know
sudo perl -e 'open($fh, "<", "/tmp/foo"); @f = <$fh>; close($fh); open($fh,
">", "/tmp/foo"); foreach(@f) { s/^(Key1=).*/$1NewValue1/; print $fh $_; }
close($fh);'
As always, TIMTOWTDI.
HTH,
-- Eric,
Alpesh Naik wrote on 07/09/2009 11:34:43 AM:
> From:>
>
> Alpesh Naik
>
> To:
>
>
On Thu, Jul 9, 2009 at 5:34 PM, Alpesh Naik wrote:
>
> For eg: below is what I have in the config file "configfile.cfg".
>
> Key1=OldValue1
> Key2=OldValue2
>
> I want to search for "Key1" and change "OldValue1" to "NewValue1"
Read the content into memory, search the key (i.e, use a regex) and
rep
Hi,
I need to edit a config file using perl cgi script. i.e., Search with the
'key' string and edit the 'value'.
For eg: below is what I have in the config file "configfile.cfg".
Key1=OldValue1
Key2=OldValue2
I want to search for "Key1" and change "OldValue1" to "NewValue1"
*(Note that, permi
Hi Robert,
I am sorry for the typos in the mail.. Actually the file is tar.gz only, Tar.gz
was a typo, and secondly the error message was still showing as .tar.gz
does not exist but again it was a mistake from my end.
Actually your response helped me get the solution. I figured out that we wer
On Wed, Jul 8, 2009 at 6:57 PM, John Refior wrote:
> On Wed, Jul 8, 2009 at 7:34 AM, Anu P wrote:
>
>> I am trying to use the '-e' filetest operator and encountered some wired
>> behavior.
>> I have a tar.gz file which is around 2.6 G and this is the code...Tar.gz
>> file is in the same directory
13 matches
Mail list logo