- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: perl question
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 01:40 AM
07-28-2004 01:40 AM
perl question
Can anyone explain what the print statement below means :-
print "print \q\q\(${tab}before $1 loop line $ct\)\;${marker}\n)";
Cheers
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 01:46 AM - last edited on 09-16-2024 02:30 AM by support_s
07-28-2004 01:46 AM - last edited on 09-16-2024 02:30 AM by support_s
Re: perl question
What else do you need explained?
-- Rod Hills
- Tags:
- iLO_OA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 01:54 AM
07-28-2004 01:54 AM
Re: perl question
--8<--- xx.pl
use strict;
use warnings;
my $tab = "\t";
"some string match on some pattern" =~ m/(match)/;
my $ct = "CT";
my $marker = "##";
print "print \q\q\(${tab}before $1 loop line $ct\)\;${marker}\n)";
-->8---
lt09:/tmp 127 > perl xx.pl
Unrecognized escape \q passed through at xx.pl line 11.
Unrecognized escape \q passed through at xx.pl line 11.
print qq( before match loop line CT);##
)lt09:/tmp 128 >
the qq() operator acts as double quoted strings, and the generated string reminds me of postscript if that is of any help
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 02:00 AM
07-28-2004 02:00 AM
Re: perl question
Now that you mention it it does kind of look like postscript code...
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2004 02:12 AM
07-28-2004 02:12 AM
Re: perl question
perl -e '$tab=TAB;$one=DOLLARONE;$ct=CT;$marker=MARKER;print "print \q\q\(${tab}
before $one loop line $ct\)\;${marker}\n)";'
print qq(TABbefore DOLLARONE loop line CT);MARKER
what else is the program doing?
live free or die
harry