Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > Perl

Perl Discussion for the PERL language - Practical Extraction and Reporting Language, is a programming language often used for creating CGI programs.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-11-2008, 09:09 AM
pvpchina pvpchina is offline
Newbie
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0
pvpchina is on a distinguished road
Red face Need a perl study-buddy

I got a test next week in perl If someone could help me with a few things later on id appreciate it..

my msn is : pvpchina@hotmail.com - maybe I can pay you something wont take more than 1 hour i promise! just need sum questions answered
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 03-11-2008, 03:14 PM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 91
Rep Power: 7
KevinADC is on a distinguished road
Default Re: Need a perl study-buddy

If you have questions you should just post them. If you are, on the other hand, trying to cheat on a test, forget it. As far as contacting you by email and providing personal service, I'll pass.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-11-2008, 05:50 PM
Jordan's Avatar   
Jordan Jordan is online now
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,229
Last Blog:
Ext JS or Ext GWT
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: Need a perl study-buddy

I agree with KevinADC. We do not cheat for you at school. If you are required to learn Perl in school then you should actually learn it, it may help you in the future.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-11-2008, 06:21 PM
pvpchina pvpchina is offline
Newbie
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0
pvpchina is on a distinguished road
Default Re: Need a perl study-buddy

its not cheating.. just hm extra tutoring to get an in-depth knowledge..anyways ill ask for some specific help later =) at the moment trying to figure out what chop means mhhhhh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-11-2008, 06:32 PM
Jordan's Avatar   
Jordan Jordan is online now
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,229
Last Blog:
Ext JS or Ext GWT
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: Need a perl study-buddy

The chop() function removes the last character of any string, regardless of what that character actually is. chop("jordan") would return cause the string to become "jorda" with a return value of "n".

Using the Perl chop() function
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 03-12-2008, 03:32 AM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 91
Rep Power: 7
KevinADC is on a distinguished road
Default Re: Need a perl study-buddy

look up perls builtin functions on the perldoc website, Perl version 5.10.0 documentation - perldoc.perl.org but as a personal observation, if you need assistance with chop() you're in for a long and hard journey in learning perl. Hopefully you were just joking.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-12-2008, 02:45 PM
pvpchina pvpchina is offline
Newbie
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0
pvpchina is on a distinguished road
Default Re: Need a perl study-buddy

cool thanks, got it. so chop is used to remove the last character, and if i have
a new line, it will remove the new line when i press enter.

now i need to know difference between

$a = <STDIN>;

my $a = <STDIN>;

=)) which one to use?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-12-2008, 03:19 PM
pvpchina pvpchina is offline
Newbie
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0
pvpchina is on a distinguished road
Default Re: Need a perl study-buddy

#!/usr/bin/perl -w
use strict;
sub funky();


funky();
print(funky()."\n");

my $random = <STDIN>;

print(funky().$random);


sub funky(){

my $var1 = $_[0] * 30;

return $var1;
}




also need help with this one.. duno why it doesnt work =(
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 03-13-2008, 04:20 AM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 91
Rep Power: 7
KevinADC is on a distinguished road
Default Re: Need a perl study-buddy

Stop doing this:

sub funky(){

do not put parenthesis after subroutine names, write it like this:

sub funky {

when you put parenthesis you are creating a prototype, there is no reason to do that and it will just complicate matters if you continue to do it.

Here it is rewritten simpler and passing $random into the function properly:

Code:
#!/usr/bin/perl
use warnings;
use strict;
my $random = 5;

print funky($random);

sub funky{
   my $var1 = $_[0] * 30;
   return $var1;
}

Last edited by KevinADC; 03-13-2008 at 04:22 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 03-13-2008, 01:01 PM
pvpchina pvpchina is offline
Newbie
 
Join Date: Mar 2008
Posts: 9
Rep Power: 0
pvpchina is on a distinguished road
Default Re: Need a perl study-buddy

thanks, im totally pro at functions now! =) gimi a task involving sub routines and functions.. wanna see if im pro ^^


Code:
#!/usr/bin/perl -w
use warnings;
use strict;
sub one;
sub two;

print ("\nPlease Choose a converter \n \n celcius to farenheit (press 1) \n Farenheit to celcius (press 2) \n");
my $a = <STDIN>;
if ($a == 1) {
print ("You chose option 1. Enter your value below \n\n");
my $b = <STDIN>;
print one($b,32,1.8);
}
sub one {
	my $var1 = ($_[0] * $_[2]) +$_[1];
	return $var1;
	}
if ($a == 2) {
print ("You chose option 2. Enter your value below\n\n");
my $c = <STDIN>;
print two($c,32,(5/9));
}
sub two {
	my $var2 = ($_[0] - $_[1]) * $_[2];
	return $var2;
	}


maybe someone see any improvements here? =))))

Last edited by pvpchina; 03-13-2008 at 01:19 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can someone tell me how to study c# better? yulin11 C# Programming 6 02-25-2008 12:53 AM
Perl text parse help (noob) dfp Perl 4 11-23-2007 02:57 PM
Looking for expert perl freelancer hhheng Request Services (Paid) 1 11-12-2007 05:53 PM
Perl is Dead. Long live Perl. Kernel Programming News 3 08-10-2007 11:49 AM
Perl Tutorial Course for Windows priorityone Perl 22 02-11-2007 01:57 AM


All times are GMT -5. The time now is 04:36 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads