Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 4th June 2012, 08:03 AM
cmani87 Offline
Registered User
 
Join Date: Jun 2012
Location: India
Posts: 4
linuxfedorakonqueror
Cool When Perl is run on Fedora17, there is no output for print statement..

Hi,

I am trying to run Perl on Fedora17 ...

This is my perl code...

> #!/usr/bin/perl
> #print "test\n";


I have saved it in Desktop using VI editor and was running using kconsole, perl test1.pl

I am expecting a output, 'test' in my screen...But, nothing appears...

And, when I create a direct text file from Desktop IDE, 'HelloWorld.pl' and run using kconsole, I am getting the error message, 'file/directory not found' ...

Is this an issue with Fedora17 and perl compatibility?

Thanks,

Mani
Reply With Quote
  #2  
Old 4th June 2012, 08:07 AM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,687
linuxfedorafirefox
Re: When Perl is run on Fedora17, there is no output for print statement..

Looks like you commented out the print command. Uncomment it.
__________________
OS: Fedora 20 x86_64 | Machine: HP Pavilion a6130n | CPU: AMD 64 X2 Dual-Core 5000+ 2.6GHz | RAM: 5GB PC5300 DDR2 | Disk: 400GB SATA | Video: ATI Radeon HD 4350 512MB | Sound: Realtek ALC888S | Ethernet: Realtek RTL8201N
Reply With Quote
  #3  
Old 4th June 2012, 08:10 AM
cmani87 Offline
Registered User
 
Join Date: Jun 2012
Location: India
Posts: 4
linuxfedorakonqueror
Re: When Perl is run on Fedora17, there is no output for print statement..

Thnxx.....I didn't notice that...!
Reply With Quote
  #4  
Old 4th June 2012, 08:11 AM
hmmsjan Offline
Registered User
 
Join Date: Jun 2009
Location: Alkmaar The Netherlands
Posts: 237
linuxchrome
Re: When Perl is run on Fedora17, there is no output for print statement..

Dear cmani87,

I see that, if you type in vi the #!/usr/bin/perl <enter>,
vi assumes that you want to start your program with a block of comments, which is of course not
a bad idea. (I see this for the first time now in F17)
But if your second line is already code, you have to remove the # at the beginning!

Good luck
__________________
H.Janssen
Alkmaar
The Netherlands
Reply With Quote
  #5  
Old 4th June 2012, 08:19 AM
cmani87 Offline
Registered User
 
Join Date: Jun 2012
Location: India
Posts: 4
linuxfedorakonqueror
Re: When Perl is run on Fedora17, there is no output for print statement..

Yeah, thanx 'jan', can you also pls. check the issue, with Desktop...? Pls. create a perl file by right clicking on desktop, and via text file and try executing them via console...facing trouble, locating the file..Can you please cross check it?
Reply With Quote
  #6  
Old 4th June 2012, 08:29 AM
hmmsjan Offline
Registered User
 
Join Date: Jun 2009
Location: Alkmaar The Netherlands
Posts: 237
linuxchrome
Re: When Perl is run on Fedora17, there is no output for print statement..

Dear cmani87,

If you mention "Desktop IDE", the question is, which IDE, and which editor.

If your file is really named 'HelloWorld.pl', then you have to respect the case and type
"perl HelloWorld.pl" in konsole after going into the Desktop directory.

With KDE and Kwrite I have no problem when I create a file within the Dolphin file manager.

Good luck
__________________
H.Janssen
Alkmaar
The Netherlands
Reply With Quote
  #7  
Old 4th June 2012, 08:35 AM
cmani87 Offline
Registered User
 
Join Date: Jun 2012
Location: India
Posts: 4
linuxfedorakonqueror
Re: When Perl is run on Fedora17, there is no output for print statement..

I guess am using GNOME default associated with Fedora...And editor is normal text editor, the one which comes after right clicking and selecting new->text file..i was respecting the case definitely, when i run the command...
Reply With Quote
  #8  
Old 6th June 2012, 06:46 AM
hmmsjan Offline
Registered User
 
Join Date: Jun 2009
Location: Alkmaar The Netherlands
Posts: 237
linuxchrome
Re: When Perl is run on Fedora17, there is no output for print statement..

Dear cmani87,

Sorry, I can not reproduce this based on your input.
Does "ls <name of your perl script>" prints the filename in the konsole window?


Good luck
__________________
H.Janssen
Alkmaar
The Netherlands
Reply With Quote
Reply

Tags
fedora17, output, perl, print, run, statement

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gimp: print fails but print of print preview works tashirosgt Using Fedora 0 2nd December 2009 06:24 PM
No print output with Canon Pixma i4500 douwat Hardware & Laptops 3 22nd November 2008 12:10 PM
[Perl? commandline?] sending WAV to default audio output adam Programming & Packaging 4 13th December 2004 03:43 PM
Perl - how to print to file satimis Programming & Packaging 1 13th November 2004 05:13 AM
How to program print output? General Question skoona Programming & Packaging 3 14th May 2004 02:52 AM


Current GMT-time: 17:12 (Friday, 31-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Al Mubarraz - Bandeirantes Instagram Photos - Henin-Beaumont Travel Photos